mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user