mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
patch 8.0.1550: various small problems in source files
Problem: Various small problems in source files. Solution: Fix the problems.
This commit is contained in:
parent
5d7ead3bc8
commit
792f0e3659
@ -651,12 +651,16 @@ LINT_OPTIONS = -beprxzF
|
|||||||
|
|
||||||
# PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
|
# PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
|
||||||
# Might not work with GUI or Perl.
|
# Might not work with GUI or Perl.
|
||||||
# For unknown reasons adding "-lc" fixes a linking problem with some versions
|
|
||||||
# of GCC. That's probably a bug in the "-pg" implementation.
|
|
||||||
# After running Vim see the profile result with: gprof vim gmon.out | vim -
|
# After running Vim see the profile result with: gprof vim gmon.out | vim -
|
||||||
# Need to recompile everything after changing this: "make clean" "make".
|
# Need to recompile everything after changing this: "make clean" "make".
|
||||||
#PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING
|
#PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING
|
||||||
#PROFILE_LIBS = -pg
|
#PROFILE_LIBS = -pg
|
||||||
|
|
||||||
|
# GCC 5 and later need the -no-pie argument.
|
||||||
|
#PROFILE_LIBS = -pg -no-pie
|
||||||
|
|
||||||
|
# For unknown reasons adding "-lc" fixes a linking problem with some versions
|
||||||
|
# of GCC. That's probably a bug in the "-pg" implementation.
|
||||||
#PROFILE_LIBS = -pg -lc
|
#PROFILE_LIBS = -pg -lc
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ You might also want to read ":help development".
|
|||||||
|
|
||||||
JUMPING AROUND
|
JUMPING AROUND
|
||||||
|
|
||||||
First of all, use ":make tags" to generate a tags file, so that you can use
|
First of all, use ":make tags" to generate a tags file, so that you can jump
|
||||||
the ":tag" command to jump around the source code.
|
around in the source code.
|
||||||
|
|
||||||
To jump to a function or variable definition, move the cursor on the name and
|
To jump to a function or variable definition, move the cursor on the name and
|
||||||
use the CTRL-] command. Use CTRL-T or CTRL-O to jump back.
|
use the CTRL-] command. Use CTRL-T or CTRL-O to jump back.
|
||||||
@ -43,6 +43,21 @@ Most code can be found in a file with an obvious name (incomplete list):
|
|||||||
window.c handling split windows
|
window.c handling split windows
|
||||||
|
|
||||||
|
|
||||||
|
DEBUGGING
|
||||||
|
|
||||||
|
If you have a reasonable recent version of gdb, you can use the :Termdebug
|
||||||
|
command to debug Vim. See ":help :Termdebug".
|
||||||
|
|
||||||
|
When something is time critical or stepping through code is a hassle, use the
|
||||||
|
channel logging to create a time-stamped log file. Add lines to the code like
|
||||||
|
this:
|
||||||
|
ch_log(NULL, "Value is now %02x", value);
|
||||||
|
After compiling and starting Vim, do:
|
||||||
|
:call ch_logfile('debuglog', 'w')
|
||||||
|
And edit "debuglog" to see what happens. The channel functions already have
|
||||||
|
ch_log() calls, thus you always see that in the log.
|
||||||
|
|
||||||
|
|
||||||
IMPORTANT VARIABLES
|
IMPORTANT VARIABLES
|
||||||
|
|
||||||
The current mode is stored in "State". The values it can have are NORMAL,
|
The current mode is stored in "State". The values it can have are NORMAL,
|
||||||
|
@ -137,7 +137,7 @@ get_beval_info(
|
|||||||
* Show a balloon with "mesg" or "list".
|
* Show a balloon with "mesg" or "list".
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list)
|
post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED)
|
||||||
{
|
{
|
||||||
# ifdef FEAT_BEVAL_TERM
|
# ifdef FEAT_BEVAL_TERM
|
||||||
# ifdef FEAT_GUI
|
# ifdef FEAT_GUI
|
||||||
|
@ -5996,7 +5996,7 @@ convert_dl(PyObject *obj, typval_T *tv,
|
|||||||
PyObject *capsule;
|
PyObject *capsule;
|
||||||
char hexBuf[sizeof(void *) * 2 + 3];
|
char hexBuf[sizeof(void *) * 2 + 3];
|
||||||
|
|
||||||
sprintf(hexBuf, "%p", obj);
|
sprintf(hexBuf, "%p", (void *)obj);
|
||||||
|
|
||||||
# ifdef PY_USE_CAPSULE
|
# ifdef PY_USE_CAPSULE
|
||||||
capsule = PyDict_GetItemString(lookup_dict, hexBuf);
|
capsule = PyDict_GetItemString(lookup_dict, hexBuf);
|
||||||
|
@ -1123,7 +1123,7 @@ GetRegProp(
|
|||||||
* This procedure is invoked by the various X event loops throughout Vims when
|
* This procedure is invoked by the various X event loops throughout Vims when
|
||||||
* a property changes on the communication window. This procedure reads the
|
* a property changes on the communication window. This procedure reads the
|
||||||
* property and enqueues command requests and responses. If immediate is true,
|
* property and enqueues command requests and responses. If immediate is true,
|
||||||
* it runs the event immediatly instead of enqueuing it. Immediate can cause
|
* it runs the event immediately instead of enqueuing it. Immediate can cause
|
||||||
* unintended behavior and should only be used for code that blocks for a
|
* unintended behavior and should only be used for code that blocks for a
|
||||||
* response.
|
* response.
|
||||||
*/
|
*/
|
||||||
|
@ -65,8 +65,7 @@ typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)(
|
|||||||
HANDLE hFile,
|
HANDLE hFile,
|
||||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||||
LPVOID lpFileInformation,
|
LPVOID lpFileInformation,
|
||||||
DWORD dwBufferSize
|
DWORD dwBufferSize);
|
||||||
);
|
|
||||||
static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
|
static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
|
||||||
|
|
||||||
# ifndef USE_FILEEXTD
|
# ifndef USE_FILEEXTD
|
||||||
@ -74,8 +73,7 @@ static BOOL WINAPI stub_GetFileInformationByHandleEx(
|
|||||||
HANDLE hFile,
|
HANDLE hFile,
|
||||||
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||||
LPVOID lpFileInformation,
|
LPVOID lpFileInformation,
|
||||||
DWORD dwBufferSize
|
DWORD dwBufferSize)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ typedef enum {
|
|||||||
VTERM_MOD_CTRL = 0x04
|
VTERM_MOD_CTRL = 0x04
|
||||||
} VTermModifier;
|
} VTermModifier;
|
||||||
|
|
||||||
|
/* The order here must match keycodes[] in src/keyboard.c! */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VTERM_KEY_NONE,
|
VTERM_KEY_NONE,
|
||||||
|
|
||||||
|
@ -2260,7 +2260,6 @@ utf_char2len(int c)
|
|||||||
/*
|
/*
|
||||||
* Convert Unicode character "c" to UTF-8 string in "buf[]".
|
* Convert Unicode character "c" to UTF-8 string in "buf[]".
|
||||||
* Returns the number of bytes.
|
* Returns the number of bytes.
|
||||||
* This does not include composing characters.
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
utf_char2bytes(int c, char_u *buf)
|
utf_char2bytes(int c, char_u *buf)
|
||||||
|
12
src/os_vms.c
12
src/os_vms.c
@ -461,8 +461,7 @@ mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, char_u ***file, i
|
|||||||
result = decc$translate_vms(vms_fixfilename(buf));
|
result = decc$translate_vms(vms_fixfilename(buf));
|
||||||
if ( (int) result == 0 || (int) result == -1 ) {
|
if ( (int) result == 0 || (int) result == -1 ) {
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ;
|
cnt = decc$to_vms(result, vms_wproc, 1 /*allow wild*/ , (flags & EW_DIR ? 0:1 ) /*allow directory*/) ;
|
||||||
}
|
}
|
||||||
if (cnt > 0)
|
if (cnt > 0)
|
||||||
@ -520,8 +519,7 @@ mch_expandpath(garray_T *gap, char_u *path, int flags)
|
|||||||
result = decc$translate_vms(vms_fixfilename(path));
|
result = decc$translate_vms(vms_fixfilename(path));
|
||||||
if ( (int) result == 0 || (int) result == -1 ) {
|
if ( (int) result == 0 || (int) result == -1 ) {
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/);
|
cnt = decc$to_vms(result, vms_wproc, 1 /*allow_wild*/, (flags & EW_DIR ? 0:1 ) /*allow directory*/);
|
||||||
}
|
}
|
||||||
if (cnt > 0)
|
if (cnt > 0)
|
||||||
@ -784,12 +782,10 @@ RealWaitForChar(
|
|||||||
if (msec == 0) {
|
if (msec == 0) {
|
||||||
/* immediate time-out; return impatiently */
|
/* immediate time-out; return impatiently */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else if (msec < 0) {
|
||||||
else if (msec < 0) {
|
|
||||||
/* no time-out; wait on indefinitely */
|
/* no time-out; wait on indefinitely */
|
||||||
continue;
|
continue;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* time-out needs to be checked */
|
/* time-out needs to be checked */
|
||||||
status = sys$gettim(&time_curr);
|
status = sys$gettim(&time_curr);
|
||||||
if (status != SS$_NORMAL)
|
if (status != SS$_NORMAL)
|
||||||
|
@ -778,6 +778,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1550,
|
||||||
/**/
|
/**/
|
||||||
1549,
|
1549,
|
||||||
/**/
|
/**/
|
||||||
|
@ -5,7 +5,7 @@ There are three ways to remove Vim:
|
|||||||
1. With the GUI uninstaller.
|
1. With the GUI uninstaller.
|
||||||
This is only available when Vim was installed with the self-installing
|
This is only available when Vim was installed with the self-installing
|
||||||
executable. This has a minimal number of questions. It can delete
|
executable. This has a minimal number of questions. It can delete
|
||||||
everything that was installed. This also unregisters the VisVim.dll
|
everything that was installed. This also unregisters the VisVim.dll.
|
||||||
|
|
||||||
2. With uninstal.exe.
|
2. With uninstal.exe.
|
||||||
This removes most installed items, but does not delete the files you
|
This removes most installed items, but does not delete the files you
|
||||||
|
Loading…
x
Reference in New Issue
Block a user