Created
October 3, 2011 15:40
-
-
Save h-east/1259394 to your computer and use it in GitHub Desktop.
Vim 7.3.303 based patch (Survey for vim-jp/issues#30)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 1d5e7413d728 src/Makefile | |
--- a/src/Makefile Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/Makefile Tue Oct 04 00:25:45 2011 +0900 | |
@@ -542,7 +542,7 @@ | |
# When using -g with some older versions of Linux you might get a | |
# statically linked executable. | |
# When not defined, configure will try to use -O2 -g for gcc and -O for cc. | |
-#CFLAGS = -g | |
+CFLAGS = -g | |
#CFLAGS = -O | |
# Optimization limits - depends on the compiler. Automatic check in configure | |
diff -r 1d5e7413d728 src/getchar.c | |
--- a/src/getchar.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/getchar.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -18,6 +18,7 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
/* | |
* These buffers are used for storing: | |
* - stuffed characters: A command that is translated into another command. | |
@@ -1341,7 +1342,9 @@ | |
tp->save_stuffbuff = stuffbuff; | |
stuffbuff.bh_first.b_next = NULL; | |
# ifdef USE_INPUT_BUF | |
+ fprintf(east_fp, "get_input_buf() %s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
tp->save_inputbuf = get_input_buf(); | |
+ fprintf(east_fp, "get_input_buf() %s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
# endif | |
} | |
@@ -1533,6 +1536,7 @@ | |
int i; | |
#endif | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
#ifdef FEAT_EVAL | |
/* Do garbage collection when garbagecollect() was called previously and | |
* we are now at the toplevel. */ | |
@@ -1561,6 +1565,7 @@ | |
++no_mapping; | |
++allow_keys; | |
} | |
+ fprintf(east_fp, "exec vgetorpeek(), %s : %d\n", __FILE__, __LINE__); | |
c = vgetorpeek(TRUE); | |
if (mod_mask) | |
{ | |
@@ -1579,6 +1584,7 @@ | |
++no_mapping; | |
allow_keys = 0; /* make sure BS is not found */ | |
+ fprintf(east_fp, "exec vgetorpeek(), %s : %d\n", __FILE__, __LINE__); | |
c2 = vgetorpeek(TRUE); /* no mapping for these chars */ | |
c = vgetorpeek(TRUE); | |
--no_mapping; | |
@@ -1719,6 +1725,7 @@ | |
buf[0] = c; | |
for (i = 1; i < n; ++i) | |
{ | |
+ fprintf(east_fp, "exec vgetorpeek(), %s : %d\n", __FILE__, __LINE__); | |
buf[i] = vgetorpeek(TRUE); | |
if (buf[i] == K_SPECIAL | |
#ifdef FEAT_GUI | |
@@ -1731,6 +1738,7 @@ | |
* or a CSI - KS_EXTRA - KE_CSI sequence, which represents | |
* a CSI (0x9B), | |
* of a K_SPECIAL - KS_EXTRA - KE_CSI, which is CSI too. */ | |
+ fprintf(east_fp, "exec vgetorpeek(), %s : %d\n", __FILE__, __LINE__); | |
c = vgetorpeek(TRUE); | |
if (vgetorpeek(TRUE) == (int)KE_CSI && c == KS_EXTRA) | |
buf[i] = CSI; | |
@@ -1754,6 +1762,7 @@ | |
may_garbage_collect = FALSE; | |
#endif | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return c; | |
} | |
@@ -1766,9 +1775,11 @@ | |
{ | |
int c; | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
c = vgetc(); | |
if (c == NUL) | |
c = get_keystroke(); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return c; | |
} | |
@@ -1921,6 +1932,7 @@ | |
int old_wcol, old_wrow; | |
int wait_tb_len; | |
+ fprintf(east_fp, "%s(a:%d)in, %s : %d\n", __func__, advance, __FILE__, __LINE__); | |
/* | |
* This function doesn't work very well when called recursively. This may | |
* happen though, because of: | |
@@ -1936,8 +1948,10 @@ | |
#ifdef FEAT_EX_EXTRA | |
&& ex_normal_busy == 0 | |
#endif | |
- ) | |
+ ){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return NUL; | |
+ } | |
local_State = get_real_state(); | |
@@ -1992,8 +2006,9 @@ | |
*/ | |
if (typebuf.tb_maplen) | |
line_breakcheck(); | |
- else | |
+ else { | |
ui_breakcheck(); /* check for CTRL-C */ | |
+ } | |
keylen = 0; | |
if (got_int) | |
{ | |
@@ -2724,6 +2739,7 @@ | |
if (((State & INSERT) != 0 || p_lz) && (State & CMDLINE) == 0 | |
&& advance && must_redraw != 0 && !need_wait_return) | |
{ | |
+ fprintf(east_fp, "exec update_screen(), %s : %d\n", __FILE__, __LINE__); | |
update_screen(0); | |
setcursor(); /* put cursor back where it belongs */ | |
} | |
@@ -2872,6 +2888,7 @@ | |
--vgetc_busy; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return c; | |
} | |
diff -r 1d5e7413d728 src/gui.c | |
--- a/src/gui.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/gui.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -10,6 +10,8 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
+ | |
/* Structure containing all the GUI information */ | |
gui_T gui; | |
@@ -912,37 +914,47 @@ | |
int attr; | |
attrentry_T *aep = NULL; | |
+ fprintf(east_fp, "%s(f:%d.cs:%d)in, gui.cursor_is_valid:%d, gui.col:%d, gui.cursor_col:%d, %s : %d\n", __func__, force, clear_selection, gui.cursor_is_valid, gui.col, gui.cursor_col, __FILE__, __LINE__); | |
/* Don't update the cursor when halfway busy scrolling or the screen size | |
* doesn't match 'columns' and 'lines. ScreenLines[] isn't valid then. */ | |
if (!can_update_cursor || screen_Columns != gui.num_cols | |
- || screen_Rows != gui.num_rows) | |
+ || screen_Rows != gui.num_rows){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
+ } | |
gui_check_pos(); | |
if (!gui.cursor_is_valid || force | |
|| gui.row != gui.cursor_row || gui.col != gui.cursor_col) | |
{ | |
gui_undraw_cursor(); | |
- if (gui.row < 0) | |
+ if (gui.row < 0){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
+ } | |
#ifdef USE_IM_CONTROL | |
if (gui.row != gui.cursor_row || gui.col != gui.cursor_col) | |
im_set_position(gui.row, gui.col); | |
#endif | |
gui.cursor_row = gui.row; | |
gui.cursor_col = gui.col; | |
+ fprintf(east_fp, "#2 gui.cursor_col:%d\n", gui.cursor_col); | |
/* Only write to the screen after ScreenLines[] has been initialized */ | |
- if (!screen_cleared || ScreenLines == NULL) | |
+ if (!screen_cleared || ScreenLines == NULL){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
+ } | |
/* Clear the selection if we are about to write over it */ | |
if (clear_selection) | |
clip_may_clear_selection(gui.row, gui.row); | |
/* Check that the cursor is inside the shell (resizing may have made | |
* it invalid) */ | |
- if (gui.row >= screen_Rows || gui.col >= screen_Columns) | |
+ if (gui.row >= screen_Rows || gui.col >= screen_Columns){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
+ } | |
gui.cursor_is_valid = TRUE; | |
@@ -1132,6 +1144,7 @@ | |
} | |
gui.highlight_mask = old_hl_mask; | |
} | |
+ fprintf(east_fp, "%s(f:%d.cs:%d)out, gui.cursor_is_valid:%d, gui.col:%d, gui.cursor_col:%d, %s : %d\n", __func__, force, clear_selection, gui.cursor_is_valid, gui.col, gui.cursor_col, __FILE__, __LINE__); | |
} | |
#if defined(FEAT_MENU) || defined(PROTO) | |
@@ -1815,18 +1828,22 @@ | |
{ | |
if (gui.in_use) | |
{ | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
/* Undraw the cursor now, we probably can't do it after the change. */ | |
gui_undraw_cursor(); | |
can_update_cursor = FALSE; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
} | |
void | |
gui_can_update_cursor() | |
{ | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
can_update_cursor = TRUE; | |
/* No need to update the cursor right now, there is always more output | |
* after scrolling. */ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
static void | |
@@ -2386,6 +2403,7 @@ | |
{ | |
if (gui.cursor_is_valid) | |
{ | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
#ifdef FEAT_HANGULIN | |
if (composing_hangul | |
&& gui.col == gui.cursor_col && gui.row == gui.cursor_row) | |
@@ -2409,6 +2427,7 @@ | |
/* Cursor_is_valid is reset when the cursor is undrawn, also reset it | |
* here in case it wasn't needed to undraw it. */ | |
gui.cursor_is_valid = FALSE; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
} | |
@@ -2421,6 +2440,7 @@ | |
{ | |
int row1, col1, row2, col2; | |
+ fprintf(east_fp, "%s(x:%d, y:%d, w:%d, h:%d)in, %s : %d\n", __func__, x, y, w, h, __FILE__, __LINE__); | |
row1 = Y_2_ROW(y); | |
col1 = X_2_COL(x); | |
row2 = Y_2_ROW(y + h - 1); | |
@@ -2437,6 +2457,7 @@ | |
*/ | |
if (gui.row == gui.cursor_row) | |
gui_update_cursor(TRUE, TRUE); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
/* | |
@@ -2464,9 +2485,12 @@ | |
int orig_col1, orig_col2; | |
#endif | |
+ fprintf(east_fp, "%s(row1:%d, col1:%d, row2:%d, col2:%d, flags:%d)in, %s : %d\n", __func__, row1, col1, row2, col2, flags, __FILE__, __LINE__); | |
/* Don't try to update when ScreenLines is not valid */ | |
- if (!screen_cleared || ScreenLines == NULL) | |
+ if (!screen_cleared || ScreenLines == NULL){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return retval; | |
+ } | |
/* Don't try to draw outside the shell! */ | |
/* Check everything, strange values may be caused by a big border width */ | |
@@ -2475,6 +2499,7 @@ | |
row1 = check_row(row1); | |
row2 = check_row(row2); | |
+ fprintf(east_fp, "gui.row:%d, gui.col:%d, gui.highlight_mask:%d, %s : %d\n", gui.row, gui.col, gui.highlight_mask, __FILE__, __LINE__); | |
/* Remember where our cursor was */ | |
old_row = gui.row; | |
old_col = gui.col; | |
@@ -2606,6 +2631,8 @@ | |
gui.col = old_col; | |
gui.highlight_mask = (int)old_hl_mask; | |
+ fprintf(east_fp, "gui.row:%d, gui.col:%d, gui.highlight_mask:%d, %s : %d\n", gui.row, gui.col, gui.highlight_mask, __FILE__, __LINE__); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return retval; | |
} | |
@@ -2681,6 +2708,7 @@ | |
{ | |
int retval; | |
+ fprintf(east_fp, "%s(wtime:%ld)in, %s : %d\n", __func__, wtime, __FILE__, __LINE__); | |
#ifdef FEAT_MENU | |
/* | |
* If we're going to wait a bit, update the menus and mouse shape for the | |
@@ -2691,10 +2719,14 @@ | |
#endif | |
gui_mch_update(); | |
- if (input_available()) /* Got char, return immediately */ | |
+ if (input_available()){ /* Got char, return immediately */ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return OK; | |
- if (wtime == 0) /* Don't wait for char */ | |
+ } | |
+ if (wtime == 0){ /* Don't wait for char */ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return FAIL; | |
+ } | |
/* Before waiting, flush any output to the screen. */ | |
gui_mch_flush(); | |
@@ -2706,6 +2738,7 @@ | |
gui_mch_start_blink(); | |
retval = gui_mch_wait_for_chars(wtime); | |
gui_mch_stop_blink(); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return retval; | |
} | |
@@ -2745,6 +2778,7 @@ | |
} | |
gui_mch_stop_blink(); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return retval; | |
} | |
diff -r 1d5e7413d728 src/gui_w32.c | |
--- a/src/gui_w32.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/gui_w32.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -25,6 +25,7 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
/* | |
* These are new in Windows ME/XP, only defined in recent compilers. | |
*/ | |
@@ -744,10 +745,10 @@ | |
WPARAM wParam, | |
LPARAM lParam) | |
{ | |
- /* | |
- TRACE("WndProc: hwnd = %08x, msg = %x, wParam = %x, lParam = %x\n", | |
+// /* | |
+ fprintf(east_fp, "WndProc: hwnd = %08x, msg = %x, wParam = %x, lParam = %x\n", | |
hwnd, uMsg, wParam, lParam); | |
- */ | |
+// */ | |
HandleMouseHide(uMsg, lParam); | |
@@ -1081,6 +1082,7 @@ | |
return MyWindowProc(hwnd, uMsg, wParam, lParam); | |
break; | |
case WM_IME_COMPOSITION: | |
+ fprintf(east_fp, "_WndProc() WM_IME_COMPOSITION\n"); | |
if (!_OnImeComposition(hwnd, wParam, lParam)) | |
return MyWindowProc(hwnd, uMsg, wParam, lParam); | |
break; | |
@@ -1847,7 +1849,9 @@ | |
// message may appear in the wrong position. | |
showmode(); | |
status_redraw_curbuf(); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
update_screen(0); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
/* Restore cursor position */ | |
gui.row = old_row; | |
gui.col = old_col; | |
@@ -1876,6 +1880,7 @@ | |
ret = GetResultStr(hwnd, GCS_RESULTSTR, &len); | |
if (ret != NULL) | |
{ | |
+ fprintf(east_fp, "_OnImeComposition() and Kakutei\n"); | |
add_to_input_buf_csi(ret, len); | |
vim_free(ret); | |
return 1; | |
@@ -1991,6 +1996,7 @@ | |
{ | |
COMPOSITIONFORM cfs; | |
+ fprintf(east_fp, "%s(row:%d, col:%d)out, %s : %d\n", __func__, row, col, __FILE__, __LINE__); | |
cfs.dwStyle = CFS_POINT; | |
cfs.ptCurrentPos.x = FILL_X(col); | |
cfs.ptCurrentPos.y = FILL_Y(row); | |
@@ -1998,6 +2004,7 @@ | |
pImmSetCompositionWindow(hImc, &cfs); | |
pImmReleaseContext(s_hwnd, hImc); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
} | |
diff -r 1d5e7413d728 src/gui_w48.c | |
--- a/src/gui_w48.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/gui_w48.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -44,6 +44,8 @@ | |
# include "glbl_ime.h" | |
#endif | |
+extern FILE *east_fp; | |
+ | |
#ifdef FEAT_MENU | |
# define MENUHINTS /* show menu hints in command line */ | |
#endif | |
@@ -1707,6 +1709,7 @@ | |
static char_u k10[] = {K_SPECIAL, 'k', ';', 0}; | |
#endif | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
pGetMessage(&msg, NULL, 0, 0); | |
#ifdef FEAT_OLE | |
@@ -1725,6 +1728,7 @@ | |
add_to_input_buf(str, (int)STRLEN(str)); | |
vim_free(str); /* was allocated in CVim::SendKeys() */ | |
} | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
#endif | |
@@ -1733,6 +1737,7 @@ | |
if (msg.message == WM_NETBEANS) | |
{ | |
netbeans_read(); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
#endif | |
@@ -1750,6 +1755,7 @@ | |
{ | |
MyTranslateMessage(&msg); | |
pDispatchMessage(&msg); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
#endif | |
@@ -1759,6 +1765,7 @@ | |
if (s_findrep_hwnd != NULL && pIsDialogMessage(s_findrep_hwnd, &msg)) | |
{ | |
HandleMouseHide(msg.message, msg.lParam); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
#endif | |
@@ -1786,6 +1793,7 @@ | |
MyTranslateMessage(&dm); /* generate dead character */ | |
if (vk != VK_SPACE) /* and send current character once more */ | |
PostMessage(msg.hwnd, msg.message, msg.wParam, msg.lParam); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
} | |
@@ -1903,9 +1911,11 @@ | |
#ifdef FEAT_MBYTE_IME | |
else if (msg.message == WM_IME_NOTIFY) | |
_OnImeNotify(msg.hwnd, (DWORD)msg.wParam, (DWORD)msg.lParam); | |
- else if (msg.message == WM_KEYUP && im_get_status()) | |
+ else if (msg.message == WM_KEYUP && im_get_status()){ | |
+ fprintf(east_fp, "exec MyTranslateMessage()\n"); | |
/* added for non-MS IME (Yasuhiro Matsumoto) */ | |
MyTranslateMessage(&msg); | |
+ } | |
#endif | |
#if !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME) | |
/* GIME_TEST */ | |
@@ -1929,6 +1939,7 @@ | |
NULL, NULL) == NULL) | |
#endif | |
pDispatchMessage(&msg); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
/* | |
@@ -1942,10 +1953,15 @@ | |
{ | |
MSG msg; | |
- if (!s_busy_processing) | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
+ if (!s_busy_processing){ | |
while (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) | |
- && !vim_is_input_buf_full()) | |
+ && !vim_is_input_buf_full()){ | |
+ fprintf(east_fp, "exec process_message()\n"); | |
process_message(); | |
+ } | |
+ } | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
/* | |
@@ -1963,13 +1979,16 @@ | |
MSG msg; | |
int focus; | |
+ fprintf(east_fp, "%s(wtime:%d)in, %s : %d\n", __func__, wtime, __FILE__, __LINE__); | |
s_timed_out = FALSE; | |
if (wtime > 0) | |
{ | |
/* Don't do anything while processing a (scroll) message. */ | |
- if (s_busy_processing) | |
+ if (s_busy_processing){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return FAIL; | |
+ } | |
s_wait_timer = (UINT)SetTimer(NULL, 0, (UINT)wtime, | |
(TIMERPROC)_OnTimer); | |
} | |
@@ -2031,10 +2050,12 @@ | |
if (!s_getting_focus) | |
s_button_pending = -1; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return OK; | |
} | |
} | |
allow_scrollbar = FALSE; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return FAIL; | |
} | |
diff -r 1d5e7413d728 src/main.c | |
--- a/src/main.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/main.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -23,6 +23,8 @@ | |
# include <limits.h> | |
#endif | |
+FILE *east_fp; | |
+ | |
/* Maximum number of commands from + or -c arguments. */ | |
#define MAX_ARG_CMDS 10 | |
@@ -523,6 +525,7 @@ | |
TIME_MSG("Termcap init"); | |
} | |
+ east_fp = fopen("h_east.txt", "w"); | |
/* | |
* Set the default values for the options that use Rows and Columns. | |
*/ | |
diff -r 1d5e7413d728 src/message.c | |
--- a/src/message.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/message.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -15,6 +15,8 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
+ | |
#if defined(FEAT_FLOAT) && defined(HAVE_MATH_H) | |
# include <math.h> | |
#endif | |
@@ -999,7 +1001,9 @@ | |
|| c == K_X2MOUSE)) | |
#endif | |
); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
ui_breakcheck(); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
#ifdef FEAT_MOUSE | |
/* | |
* Avoid that the mouse-up event causes visual mode to start. | |
diff -r 1d5e7413d728 src/screen.c | |
--- a/src/screen.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/screen.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -89,6 +89,7 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
/* | |
* The attributes that are actually active for writing to the screen. | |
*/ | |
@@ -308,7 +309,9 @@ | |
int type; | |
{ | |
redraw_curbuf_later(type); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
update_screen(type); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
#endif | |
@@ -328,9 +331,12 @@ | |
int did_one; | |
#endif | |
+ fprintf(east_fp, "%s(type:%d)in, %s : %d\n", __func__, type, __FILE__, __LINE__); | |
/* Don't do anything if the screen structures are (not yet) valid. */ | |
- if (!screen_valid(TRUE)) | |
+ if (!screen_valid(TRUE)){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
+ } | |
if (must_redraw) | |
{ | |
@@ -356,6 +362,7 @@ | |
must_redraw = type; | |
if (type > INVERTED_ALL) | |
curwin->w_lines_valid = 0; /* don't use w_lines[].wl_size now */ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return; | |
} | |
@@ -523,8 +530,10 @@ | |
/* Remove the cursor before starting to do anything, because | |
* scrolling may make it difficult to redraw the text under | |
* it. */ | |
- if (gui.in_use) | |
+ if (gui.in_use){ | |
+ fprintf(east_fp, "exec gui_undraw_cursor(), %s : %d\n", __FILE__, __LINE__); | |
gui_undraw_cursor(); | |
+ } | |
#endif | |
} | |
#endif | |
@@ -579,11 +588,14 @@ | |
if (gui.in_use) | |
{ | |
out_flush(); /* required before updating the cursor */ | |
- if (did_one) | |
+ if (did_one) { | |
+ fprintf(east_fp, "exec gui_update_cursor(), %s : %d\n", __FILE__, __LINE__); | |
gui_update_cursor(FALSE, FALSE); | |
+ } | |
gui_update_scrollbars(FALSE); | |
} | |
#endif | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
#if defined(FEAT_CONCEAL) || defined(PROTO) | |
diff -r 1d5e7413d728 src/ui.c | |
--- a/src/ui.c Thu Sep 08 23:24:14 2011 +0200 | |
+++ b/src/ui.c Tue Oct 04 00:25:45 2011 +0900 | |
@@ -18,6 +18,7 @@ | |
#include "vim.h" | |
+extern FILE *east_fp; | |
void | |
ui_write(s, len) | |
char_u *s; | |
@@ -119,6 +120,7 @@ | |
{ | |
int retval = 0; | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
#if defined(FEAT_GUI) && (defined(UNIX) || defined(VMS)) | |
/* | |
* Use the typeahead if there is any. | |
@@ -130,10 +132,12 @@ | |
mch_memmove(buf, ta_str + ta_off, (size_t)ta_len); | |
vim_free(ta_str); | |
ta_str = NULL; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return ta_len; | |
} | |
mch_memmove(buf, ta_str + ta_off, (size_t)maxlen); | |
ta_off += maxlen; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return maxlen; | |
} | |
#endif | |
@@ -155,13 +159,16 @@ | |
# ifndef NO_CONSOLE | |
retval = mch_inchar(buf, maxlen, (wtime >= 0 && wtime < 10) | |
? 10L : wtime, tb_change_cnt); | |
- if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0) | |
+ if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0){ | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
goto theend; | |
+ } | |
# endif | |
if (wtime == -1 && ++count == 1000) | |
read_error_exit(); | |
buf[0] = CAR; | |
retval = 1; | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
goto theend; | |
} | |
#endif | |
@@ -183,6 +190,9 @@ | |
{ | |
if (gui_wait_for_chars(wtime) && !typebuf_changed(tb_change_cnt)) | |
retval = read_from_input_buf(buf, (long)maxlen); | |
+ if (retval > 0) { | |
+ fprintf(east_fp, "GOT!\n"); | |
+ } | |
} | |
#endif | |
#ifndef NO_CONSOLE | |
@@ -207,6 +217,7 @@ | |
if (do_profiling == PROF_YES && wtime != 0) | |
prof_inchar_exit(); | |
#endif | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
return retval; | |
} | |
@@ -219,7 +230,9 @@ | |
#ifdef FEAT_GUI | |
if (gui.in_use) | |
{ | |
+ fprintf(east_fp, "%s() %d\n", __func__, __LINE__); | |
gui_mch_update(); | |
+ fprintf(east_fp, "%s() %d\n", __func__, __LINE__); | |
return input_available(); | |
} | |
#endif | |
@@ -359,12 +372,17 @@ | |
void | |
ui_breakcheck() | |
{ | |
+ fprintf(east_fp, "%s()in, %s : %d\n", __func__, __FILE__, __LINE__); | |
#ifdef FEAT_GUI | |
if (gui.in_use) | |
+ { | |
+ fprintf(east_fp, "exec gui_mch_update(), %s : %d\n", __FILE__, __LINE__); | |
gui_mch_update(); | |
+ } | |
else | |
#endif | |
mch_breakcheck(); | |
+ fprintf(east_fp, "%s()out, %s : %d\n", __func__, __FILE__, __LINE__); | |
} | |
/***************************************************************************** | |
@@ -1646,6 +1664,7 @@ | |
inbufcount -= maxlen; | |
if (inbufcount) | |
mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount); | |
+ fprintf(east_fp, "%s(), ret:%d, %s : %d\n", __func__, (int)maxlen, __FILE__, __LINE__); | |
return (int)maxlen; | |
} | |
@@ -1673,7 +1692,9 @@ | |
# endif | |
) | |
{ | |
+ fprintf(east_fp, "%s() %d\n", __func__, __LINE__); | |
gui_mch_update(); | |
+ fprintf(east_fp, "%s() %d\n", __func__, __LINE__); | |
return; | |
} | |
#endif | |
@@ -3143,8 +3164,11 @@ | |
repeat_message(); | |
else if ((State & NORMAL) || (State & INSERT)) | |
{ | |
- if (must_redraw != 0) | |
+ if (must_redraw != 0){ | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
update_screen(0); | |
+ fprintf(east_fp, "%s(), %s : %d\n", __func__, __FILE__, __LINE__); | |
+ } | |
setcursor(); | |
} | |
cursor_on(); /* redrawing may have switched it off */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment