dhruvasagar / dhruvasagar/vim-markify

Neovim 0.10.1+: Marker in wrong line when the file containing the error is opened by jump

Open
#9 16 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
28
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Sometimes when I jump to an error in my quickfix list, the error marker is set in line 1 instead of the error line.

### How to reproduce:

`main.c`:

```c
#include "main.h"
int main(void) { return 0; }
```

`main.h`:

```c
int x = 0;
int y = y1;
```

`Makefile`:

```Makefile
main: main.o
$(CC) $(CFLAGS) -o $@ $^
```

* Open **only** `main.c`.
* Run `:make`.
* This opens `main.h` with the cursor on `y1` (line 2) but the error marker on line 1.

![2024-11-10 18 40 27 238x89 Region](https://github.com/user-attachments/assets/ab064a90-96d8-4c99-9b0e-46bd9a36b9d2)

Running `:Markify` manually doesn't update the marker. But running `:MarkifyToggle` twice moves the marker to line 2.

Any ideas how to fix this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.