Patch 8.2.1976
Problem:    Cannot backspace in prompt buffer after using cursor-left. (Maxim
            Kim)
Solution:   Ignore "arrow_used" in a prompt buffer. (closes #7281)
Files:      src/edit.c, src/testdir/test_prompt_buffer.vim


*** ../vim-8.2.1975/src/edit.c  2020-10-24 20:49:37.494683051 +0200
--- src/edit.c  2020-11-11 20:51:56.914253596 +0100
***************
*** 3946,3953 ****
  #endif
                ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
                    || (!can_bs(BS_START)
!                       && (arrow_used
!                           || (curwin->w_cursor.lnum == Insstart_orig.lnum
                                && curwin->w_cursor.col <= Insstart_orig.col)))
                    || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
                                         && curwin->w_cursor.col <= ai_col)
--- 3946,3956 ----
  #endif
                ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0)
                    || (!can_bs(BS_START)
!                       && ((arrow_used
! #ifdef FEAT_JOB_CHANNEL
!                               && !bt_prompt(curbuf)
! #endif
!                       ) || (curwin->w_cursor.lnum == Insstart_orig.lnum
                                && curwin->w_cursor.col <= Insstart_orig.col)))
                    || (!can_bs(BS_INDENT) && !arrow_used && ai_col > 0
                                         && curwin->w_cursor.col <= ai_col)
*** ../vim-8.2.1975/src/testdir/test_prompt_buffer.vim  2020-10-01 
20:03:00.769332224 +0200
--- src/testdir/test_prompt_buffer.vim  2020-11-11 20:51:29.054302790 +0100
***************
*** 122,127 ****
--- 122,135 ----
    bwipe!
  endfunc
  
+ func Test_prompt_backspace()
+   new
+   set buftype=prompt
+   call feedkeys("A123456\<Left>\<BS>\<Esc>", 'xt')
+   call assert_equal('% 12346', getline(1))
+   bwipe!
+ endfunc
+ 
  " Test for editing the prompt buffer
  func Test_prompt_buffer_edit()
    new
*** ../vim-8.2.1975/src/version.c       2020-11-10 22:03:37.027341067 +0100
--- src/version.c       2020-11-11 20:48:04.534632161 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1976,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
234. You started college as a chemistry major, and walk out four years
     later as an Internet provider.

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202011111953.0ABJr4hX927856%40masaka.moolenaar.net.

Raspunde prin e-mail lui