diff options
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r-- | src/nvim/memline.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c index bfe90bb680..fb7fdfb8b2 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -63,7 +63,6 @@ #include "nvim/getchar.h" #include "nvim/gettext_defs.h" #include "nvim/globals.h" -#include "nvim/highlight.h" #include "nvim/highlight_defs.h" #include "nvim/input.h" #include "nvim/macros_defs.h" @@ -805,8 +804,7 @@ void ml_recover(bool checkext) // list the names of the swapfiles recover_names(fname, true, NULL, 0, NULL); msg_putchar('\n'); - msg_puts(_("Enter number of swap file to use (0 to quit): ")); - i = get_number(false, NULL); + i = prompt_for_input(_("Enter number of swap file to use (0 to quit): "), 0, false, NULL); if (i < 1 || i > len) { goto theend; } @@ -1862,7 +1860,7 @@ int gchar_pos(pos_T *pos) FUNC_ATTR_NONNULL_ARG(1) { // When searching columns is sometimes put at the end of a line. - if (pos->col == MAXCOL) { + if (pos->col == MAXCOL || pos->col > ml_get_len(pos->lnum)) { return NUL; } return utf_ptr2char(ml_get_pos(pos)); |