Patch 8.0.1382
Problem:    Get "no write since last change" message if a terminal is open.
            (Fritz mehner)
Solution:   Don't consider a buffer changed if it's a terminal window.
Files:      src/ex_cmds.c, src/undo.c, src/proto/undo.pro


*** ../vim-8.0.1381/src/ex_cmds.c       2017-11-26 17:07:58.446765454 +0100
--- src/ex_cmds.c       2017-12-09 19:21:49.320795188 +0100
***************
*** 1482,1488 ****
  #endif
                && msg_silent == 0)
        FOR_ALL_BUFFERS(buf)
!           if (bufIsChanged(buf))
            {
  #ifdef FEAT_GUI_MSWIN
                if (!winstart)
--- 1482,1488 ----
  #endif
                && msg_silent == 0)
        FOR_ALL_BUFFERS(buf)
!           if (bufIsChangedNotTerm(buf))
            {
  #ifdef FEAT_GUI_MSWIN
                if (!winstart)
*** ../vim-8.0.1381/src/undo.c  2017-11-11 23:37:04.192694223 +0100
--- src/undo.c  2017-12-09 19:23:04.984378597 +0100
***************
*** 3523,3528 ****
--- 3523,3530 ----
   * Check if the 'modified' flag is set, or 'ff' has changed (only need to
   * check the first character, because it can only be "dos", "unix" or "mac").
   * "nofile" and "scratch" type buffers are considered to always be unchanged.
+  * Also considers a buffer changed when a terminal window contains a running
+  * job.
   */
      int
  bufIsChanged(buf_T *buf)
***************
*** 3531,3536 ****
--- 3533,3547 ----
      if (term_job_running(buf->b_term))
        return TRUE;
  #endif
+     return bufIsChangedNotTerm(buf);
+ }
+ 
+ /*
+  * Like bufIsChanged() but ignoring a terminal window.
+  */
+     int
+ bufIsChangedNotTerm(buf_T *buf)
+ {
      return !bt_dontwrite(buf)
        && (buf->b_changed || file_ff_differs(buf, TRUE));
  }
*** ../vim-8.0.1381/src/proto/undo.pro  2016-09-12 13:04:22.000000000 +0200
--- src/proto/undo.pro  2017-12-09 19:23:08.960356716 +0100
***************
*** 25,30 ****
--- 25,31 ----
  void u_undoline(void);
  void u_blockfree(buf_T *buf);
  int bufIsChanged(buf_T *buf);
+ int bufIsChangedNotTerm(buf_T *buf);
  int curbufIsChanged(void);
  void u_eval_tree(u_header_T *first_uhp, list_T *list);
  /* vim: set ft=c : */
*** ../vim-8.0.1381/src/version.c       2017-12-09 19:13:08.579678220 +0100
--- src/version.c       2017-12-09 19:21:39.180851049 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1382,
  /**/

-- 
>From "know your smileys":
 :-{}   Too much lipstick

 /// 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