On 4/14/20 11:23 AM, Bram Moolenaar wrote:
Christian wrote:

On Di, 14 Apr 2020, Tavis Ormandy wrote:

To be clear, very detailed reproduction steps:

1. In a new file, write this:

one two three

2. Enter normal mode, position the cursor after "two" and enter insert
    mode, then type "four". It should look like this:

one twofour three

3. *before* leaving insert mode, hit CTRL-W. I think it will now look
     like this:

one two three

     But I want this:

one three
Ah got it. That must have been there very long (and I actually like this
behaviour).

I suppose you want something like this:

diff --git a/src/edit.c b/src/edit.c
index edd2374e8..5be76db07 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4883,9 +4883,7 @@ ins_bs(
  #ifdef FEAT_RIGHTLEFT
                     revins_on ||
  #endif
-                   (curwin->w_cursor.col > mincol
-                   && (curwin->w_cursor.lnum != Insstart_orig.lnum
-                       || curwin->w_cursor.col != Insstart_orig.col)));
+                   curwin->w_cursor.col > mincol);
         }
         did_backspace = TRUE;
      }


If you want to have this included into propper vim, we probably need
another CPOPTION value (or backspace value?), to make this configurable
and a test.
Yeah, would need another value in 'backspace'.  CTRL-W stopping at the
insert point has always been the behavior.
        :set backspace=indent,eol,start,nostop
Can't think of a good name for "nostop", could be improved.  Or just:
        :set bs=3


While certainly it's your guys' decision, but, as CTRL-W stops but then continues before the start of the insertion, is another option really necessary? In fact, I think it could be the current behavior is better, as it stops indicating you've now deleted everything you just entered, but if you really want to delete more, just keep hitting CTRL-W.

Brian

--
--
You received this message from the "vim_use" 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_use" 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_use/9a39a049-1b54-90fd-b0e8-d6ec03a10c43%40gmail.com.

Reply via email to