1
0
forked from aniani/vim

patch 8.0.0762: ml_get error with :psearch in buffer without a name

Problem:    ml_get error with :psearch in buffer without a name. (Dominique
            Pelle)
Solution:   Use the buffer number instead of the file name.  Check the cursor
            position.
This commit is contained in:
Bram Moolenaar
2017-07-23 22:02:02 +02:00
parent 1f2903c431
commit c31f9ae4f1
5 changed files with 19 additions and 1 deletions

View File

@@ -5425,7 +5425,7 @@ search_line:
if (g_do_tagpreview != 0)
{
if (!GETFILE_SUCCESS(getfile(
0, curwin_save->w_buffer->b_fname,
curwin_save->w_buffer->b_fnum, NULL,
NULL, TRUE, lnum, FALSE)))
break; /* failed to jump to file */
}
@@ -5433,6 +5433,7 @@ search_line:
#endif
setpcmark();
curwin->w_cursor.lnum = lnum;
check_cursor();
}
else
{