vim-patch:8.0.1041: bogus characters when indenting during visual-block append

Problem:    Bogus characters appear when indenting kicks in while doing a
            visual-block append.
Solution:   Recompute when indenting is done. (Christian Brabandt)
e2e69e4813
This commit is contained in:
Jan Edmund Lazo
2018-08-23 04:43:44 -04:00
parent fe57a8a4e4
commit d677ae5f64
8 changed files with 62 additions and 21 deletions

View File

@@ -30,7 +30,7 @@
#include "nvim/state.h"
#include "nvim/strings.h"
#include "nvim/path.h"
#include "nvim/cursor.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "charset.c.generated.h"
@@ -1465,6 +1465,18 @@ char_u *skipwhite(const char_u *q)
return (char_u *)p;
}
// getwhitecols: return the number of whitespace
// columns (bytes) at the start of a given line
intptr_t getwhitecols_curline(void)
{
return getwhitecols(get_cursor_line_ptr());
}
intptr_t getwhitecols(const char_u *p)
{
return skipwhite(p) - p;
}
/// Skip over digits
///
/// @param[in] q String to skip digits in.