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.
diff --git a/src/search.c b/src/search.c
index ac11927..79cd50a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -5425,7 +5425,7 @@
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 @@
#endif
setpcmark();
curwin->w_cursor.lnum = lnum;
+ check_cursor();
}
else
{