]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.143 v7.4.143
authorBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 11:17:02 +0000 (12:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 14 Jan 2014 11:17:02 +0000 (12:17 +0100)
Problem:    TextChangedI is not triggered.
Solution:   Reverse check for "ready". (lilydjwg)

src/edit.c
src/version.c

index d3c02085a8daf956c2031b27f4bd97902cdbeb57..0904af8576c4d54033a0c42ce0c0c72e722aaf09 100644 (file)
@@ -1556,87 +1556,89 @@ ins_redraw(ready)
     int                conceal_update_lines = FALSE;
 #endif
 
-    if (!char_avail())
-    {
+    if (char_avail())
+       return;
+
 #if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
-       /* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
-        * visible, the command might delete it. */
-       if (ready && (
+    /* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
+     * visible, the command might delete it. */
+    if (ready && (
 # ifdef FEAT_AUTOCMD
-                   has_cursormovedI()
+               has_cursormovedI()
 # endif
 # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
-                   ||
+               ||
 # endif
 # ifdef FEAT_CONCEAL
-                   curwin->w_p_cole > 0
+               curwin->w_p_cole > 0
 # endif
-                   )
-           && !equalpos(last_cursormoved, curwin->w_cursor)
+               )
+       && !equalpos(last_cursormoved, curwin->w_cursor)
 # ifdef FEAT_INS_EXPAND
-           && !pum_visible()
+       && !pum_visible()
 # endif
-          )
-       {
+       )
+    {
 # ifdef FEAT_SYN_HL
-           /* Need to update the screen first, to make sure syntax
-            * highlighting is correct after making a change (e.g., inserting
-            * a "(".  The autocommand may also require a redraw, so it's done
-            * again below, unfortunately. */
-           if (syntax_present(curwin) && must_redraw)
-               update_screen(0);
+       /* Need to update the screen first, to make sure syntax
+        * highlighting is correct after making a change (e.g., inserting
+        * a "(".  The autocommand may also require a redraw, so it's done
+        * again below, unfortunately. */
+       if (syntax_present(curwin) && must_redraw)
+           update_screen(0);
 # endif
 # ifdef FEAT_AUTOCMD
-           if (has_cursormovedI())
-               apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+       if (has_cursormovedI())
+           apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
 # endif
 # ifdef FEAT_CONCEAL
-           if (curwin->w_p_cole > 0)
-           {
-               conceal_old_cursor_line = last_cursormoved.lnum;
-               conceal_new_cursor_line = curwin->w_cursor.lnum;
-               conceal_update_lines = TRUE;
-           }
-# endif
-           last_cursormoved = curwin->w_cursor;
+       if (curwin->w_p_cole > 0)
+       {
+           conceal_old_cursor_line = last_cursormoved.lnum;
+           conceal_new_cursor_line = curwin->w_cursor.lnum;
+           conceal_update_lines = TRUE;
        }
+# endif
+       last_cursormoved = curwin->w_cursor;
+    }
 #endif
+
 #ifdef FEAT_AUTOCMD
-       /* Trigger TextChangedI if b_changedtick differs. */
-       if (!ready && has_textchangedI()
-               && last_changedtick != curbuf->b_changedtick
+    /* Trigger TextChangedI if b_changedtick differs. */
+    if (ready && has_textchangedI()
+           && last_changedtick != curbuf->b_changedtick
 # ifdef FEAT_INS_EXPAND
-               && !pum_visible()
+           && !pum_visible()
 # endif
-               )
-       {
-           if (last_changedtick_buf == curbuf)
-               apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
-           last_changedtick_buf = curbuf;
-           last_changedtick = curbuf->b_changedtick;
-       }
+           )
+    {
+       if (last_changedtick_buf == curbuf)
+           apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
+       last_changedtick_buf = curbuf;
+       last_changedtick = curbuf->b_changedtick;
+    }
 #endif
-       if (must_redraw)
-           update_screen(0);
-       else if (clear_cmdline || redraw_cmdline)
-           showmode();         /* clear cmdline and show mode */
+
+    if (must_redraw)
+       update_screen(0);
+    else if (clear_cmdline || redraw_cmdline)
+       showmode();             /* clear cmdline and show mode */
 # if defined(FEAT_CONCEAL)
-       if ((conceal_update_lines
-               && (conceal_old_cursor_line != conceal_new_cursor_line
-                   || conceal_cursor_line(curwin)))
-               || need_cursor_line_redraw)
-       {
-           if (conceal_old_cursor_line != conceal_new_cursor_line)
-               update_single_line(curwin, conceal_old_cursor_line);
-           update_single_line(curwin, conceal_new_cursor_line == 0
-                          ? curwin->w_cursor.lnum : conceal_new_cursor_line);
-           curwin->w_valid &= ~VALID_CROW;
-       }
-# endif
-       showruler(FALSE);
-       setcursor();
-       emsg_on_display = FALSE;        /* may remove error message now */
+    if ((conceal_update_lines
+           && (conceal_old_cursor_line != conceal_new_cursor_line
+               || conceal_cursor_line(curwin)))
+           || need_cursor_line_redraw)
+    {
+       if (conceal_old_cursor_line != conceal_new_cursor_line)
+           update_single_line(curwin, conceal_old_cursor_line);
+       update_single_line(curwin, conceal_new_cursor_line == 0
+                      ? curwin->w_cursor.lnum : conceal_new_cursor_line);
+       curwin->w_valid &= ~VALID_CROW;
     }
+# endif
+    showruler(FALSE);
+    setcursor();
+    emsg_on_display = FALSE;   /* may remove error message now */
 }
 
 /*
index a468a79c31d1a6840e4e7afdc9ab03628a6fbc53..c3281cafcb292b37d518395308a73dba2c79970a 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    143,
 /**/
     142,
 /**/