Patch 8.0.0771
Problem:    Cursor in a terminal window not always updated in the GUI.
Solution:   Call gui_update_cursor(). (Yasuhiro Matsumoto, closes #1868)
Files:      src/terminal.c


*** ../vim-8.0.0770/src/terminal.c      2017-07-24 22:26:39.761774842 +0200
--- src/terminal.c      2017-07-24 23:35:32.135424640 +0200
***************
*** 33,39 ****
   * while, if the terminal window is visible, the screen contents is drawn.
   *
   * TODO:
!  * - do not store terminal buffer in viminfo
   * - Add a scrollback buffer (contains lines to scroll off the top).
   *   Can use the buf_T lines, store attributes somewhere else?
   * - When the job ends:
--- 33,40 ----
   * while, if the terminal window is visible, the screen contents is drawn.
   *
   * TODO:
!  * - include functions from #1871
!  * - do not store terminal buffer in viminfo.  Or prefix term:// ?
   * - Add a scrollback buffer (contains lines to scroll off the top).
   *   Can use the buf_T lines, store attributes somewhere else?
   * - When the job ends:
***************
*** 314,319 ****
--- 315,332 ----
      vterm_screen_flush_damage(vterm_obtain_screen(vterm));
  }
  
+     static void
+ update_cursor()
+ {
+     /* TODO: this should not always be needed */
+     setcursor();
+     out_flush();
+ #ifdef FEAT_GUI
+     if (gui.in_use)
+       gui_update_cursor(FALSE, FALSE);
+ #endif
+ }
+ 
  /*
   * Invoked when "msg" output from a job was received.  Write it to the 
terminal
   * of "buffer".
***************
*** 329,336 ****
  
      /* TODO: only update once in a while. */
      update_screen(0);
!     setcursor();
!     out_flush();
  }
  
  /*
--- 342,348 ----
  
      /* TODO: only update once in a while. */
      update_screen(0);
!     update_cursor();
  }
  
  /*
***************
*** 461,468 ****
      {
        /* TODO: skip screen update when handling a sequence of keys. */
        update_screen(0);
!       setcursor();
!       out_flush();
        ++no_mapping;
        ++allow_keys;
        got_int = FALSE;
--- 473,479 ----
      {
        /* TODO: skip screen update when handling a sequence of keys. */
        update_screen(0);
!       update_cursor();
        ++no_mapping;
        ++allow_keys;
        got_int = FALSE;
***************
*** 550,557 ****
      if (did_one)
      {
        redraw_statuslines();
!       setcursor();
!       out_flush();
      }
      if (curbuf->b_term != NULL && curbuf->b_term->tl_job == job)
        maketitle();
--- 561,567 ----
      if (did_one)
      {
        redraw_statuslines();
!       update_cursor();
      }
      if (curbuf->b_term != NULL && curbuf->b_term->tl_job == job)
        maketitle();
***************
*** 616,625 ****
      }
  
      if (is_current)
!     {
!       setcursor();
!       out_flush();
!     }
  
      return 1;
  }
--- 626,632 ----
      }
  
      if (is_current)
!       update_cursor();
  
      return 1;
  }
*** ../vim-8.0.0770/src/version.c       2017-07-24 23:05:31.164530169 +0200
--- src/version.c       2017-07-24 23:33:26.360340009 +0200
***************
*** 771,772 ****
--- 771,774 ----
  {   /* Add new patch number below this line */
+ /**/
+     771,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
242. You turn down a better-paying job because it doesn't come with
     a free e-mail account.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui