mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 21:38:19 +00:00
eval: Split eval.c into smaller files
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "nvim/state.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/mark.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "cursor.c.generated.h"
|
||||
@@ -227,9 +228,10 @@ static int coladvance2(
|
||||
}
|
||||
}
|
||||
|
||||
/* prevent from moving onto a trail byte */
|
||||
if (has_mbyte)
|
||||
mb_adjustpos(curbuf, pos);
|
||||
// Prevent from moving onto a trail byte.
|
||||
if (has_mbyte) {
|
||||
mark_mb_adjustpos(curbuf, pos);
|
||||
}
|
||||
|
||||
if (col < wcol)
|
||||
return FAIL;
|
||||
@@ -361,9 +363,10 @@ void check_cursor_col_win(win_T *win)
|
||||
win->w_cursor.col = len;
|
||||
} else {
|
||||
win->w_cursor.col = len - 1;
|
||||
/* Move the cursor to the head byte. */
|
||||
if (has_mbyte)
|
||||
mb_adjustpos(win->w_buffer, &win->w_cursor);
|
||||
// Move the cursor to the head byte.
|
||||
if (has_mbyte) {
|
||||
mark_mb_adjustpos(win->w_buffer, &win->w_cursor);
|
||||
}
|
||||
}
|
||||
} else if (win->w_cursor.col < 0) {
|
||||
win->w_cursor.col = 0;
|
||||
|
Reference in New Issue
Block a user