# vim: Fix global mark overwriting inconsistency \(\#44765\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e1063743e8314af942e6a017ebfeeb06acddacaf)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e1063743e8314af942e6a017ebfeeb06acddacaf

Requested commit: e1063743e8314af942e6a017ebfeeb06acddacaf

Commit: e1063743e8314af942e6a017ebfeeb06acddacaf

Tree: 4d20a0e232a2c3a2bcbe61a0d8ed35f793ab599e

Author: AidanV

Committer: GitHub

## Message

```
vim: Fix global mark overwriting inconsistency (#44765)

Closes #43963

This issue was caused by the global marks not being deleted. Previously
marking the first file `m A`

<img width="1736" height="888" alt="Screenshot From 2025-12-13 01-37-55"
src="https://github.com/user-attachments/assets/9e46747f-7bb3-4297-82d4-44a20ef9e91a"
/>

followed by marking the second file `m A`

<img width="1736" height="888" alt="Screenshot From 2025-12-13 01-37-42"
src="https://github.com/user-attachments/assets/0d126b47-2c42-475f-826a-173c0d5a1156"
/>

and navigating back to the first file

<img width="1736" height="888" alt="Screenshot From 2025-12-13 01-37-30"
src="https://github.com/user-attachments/assets/032fd0bd-ff71-4a12-987a-7f1743016f6d"
/>

shows that the mark still exists and was not properly deleted. After
these changes the global mark in the original file is correctly
overwritten.

Added regression test for this.

Release Notes:

- Fixed bug where overwriting global Vim marks was inconsistent
```

## Parents

- [3cc21a01ef0317e1c098cdb4c55872d9affede6a](https://git.cafe/gitcafe/zed/commit/3cc21a01ef0317e1c098cdb4c55872d9affede6a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e1063743e8314af942e6a017ebfeeb06acddacaf?format=markdown)
