To: vim_dev@googlegroups.com Subject: Patch 8.2.1976 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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\\\", '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 -- Bram@Moolenaar.net -- 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 ///