mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.251
Problem: "gH<Del>" deletes the current line, except when it's the last line. Solution: Set the "include" flag to indicate the last line is to be deleted.
This commit is contained in:
24
src/normal.c
24
src/normal.c
@@ -1795,17 +1795,25 @@ do_pending_operator(cap, old_col, gui_yank)
|
||||
{
|
||||
oap->inclusive = FALSE;
|
||||
/* Try to include the newline, unless it's an operator
|
||||
* that works on lines only */
|
||||
if (*p_sel != 'o'
|
||||
&& !op_on_lines(oap->op_type)
|
||||
&& oap->end.lnum < curbuf->b_ml.ml_line_count)
|
||||
* that works on lines only. */
|
||||
if (*p_sel != 'o' && !op_on_lines(oap->op_type))
|
||||
{
|
||||
++oap->end.lnum;
|
||||
oap->end.col = 0;
|
||||
if (oap->end.lnum < curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
++oap->end.lnum;
|
||||
oap->end.col = 0;
|
||||
# ifdef FEAT_VIRTUALEDIT
|
||||
oap->end.coladd = 0;
|
||||
oap->end.coladd = 0;
|
||||
# endif
|
||||
++oap->line_count;
|
||||
++oap->line_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Cannot move below the last line, make the op
|
||||
* inclusive to tell the operation to include the
|
||||
* line break. */
|
||||
oap->inclusive = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user