aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index ebde81bca6..274bf72f3b 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -5101,11 +5101,13 @@ file_name_in_line (
* search forward for what could be the start of a file name
*/
ptr = line + col;
- while (*ptr != NUL && !vim_isfilec(*ptr))
- mb_ptr_adv(ptr);
- if (*ptr == NUL) { /* nothing found */
- if (options & FNAME_MESS)
+ while (*ptr != NUL && !vim_isfilec(*ptr)) {
+ MB_PTR_ADV(ptr);
+ }
+ if (*ptr == NUL) { // nothing found
+ if (options & FNAME_MESS) {
EMSG(_("E446: No file name under cursor"));
+ }
return NULL;
}