Patch 8.1.1011
Problem:    Indent from autoindent not removed from blank line. (Daniel Hahler)
Solution:   Do not reset did_ai when text follows. (closes #4119)
Files:      src/misc1.c, src/testdir/test_edit.vim


*** ../vim-8.1.1010/src/misc1.c 2019-02-21 16:21:16.369816652 +0100
--- src/misc1.c 2019-03-16 18:04:31.121472482 +0100
***************
*** 1497,1504 ****
                ++less_cols_off;
            }
        }
-       if (*p_extra != NUL)
-           did_ai = FALSE;         /* append some text, don't truncate now */
  
        /* columns for marks adjusted for removed columns */
        less_cols = (int)(p_extra - saved_line);
--- 1497,1502 ----
*** ../vim-8.1.1010/src/testdir/test_edit.vim   2019-01-24 17:59:35.139217458 
+0100
--- src/testdir/test_edit.vim   2019-03-16 17:16:29.511198226 +0100
***************
*** 399,406 ****
      call feedkeys("A {\<cr>more\<cr>}\<esc>", 'tnix')
      call assert_equal(["\tabc {", "\t\tmore", "\t}"], getline(1, '$'))
      set smartindent& autoindent&
!     bw!
    endif
  endfunc
  
  func Test_edit_CR()
--- 399,417 ----
      call feedkeys("A {\<cr>more\<cr>}\<esc>", 'tnix')
      call assert_equal(["\tabc {", "\t\tmore", "\t}"], getline(1, '$'))
      set smartindent& autoindent&
!     bwipe!
    endif
+ 
+   " Test autoindent removing indent of blank line.
+   new
+   call setline(1, '    foo bar baz')
+   set autoindent
+   exe "normal 0eea\<CR>\<CR>\<Esc>"
+   call assert_equal("    foo bar", getline(1))
+   call assert_equal("", getline(2))
+   call assert_equal("    baz", getline(3))
+   set autoindent&
+   bwipe!
  endfunc
  
  func Test_edit_CR()
*** ../vim-8.1.1010/src/version.c       2019-03-16 16:38:37.560654505 +0100
--- src/version.c       2019-03-16 18:10:38.583155585 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     1011,
  /**/

-- 
I got a new desk stapler. It broke on the first desk I tried.

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