hluk / hluk/FakeVim

Comment detecting problem in the command `source`

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
183
Forks
31
Avg merge
3d 11h
Merged PRs (30d)
2

Description

As stated in :

> It is not possible to add a comment to a shell command ":!cmd" or to the ":map" command and a few others (mainly commands that expect expressions), that see the '"' as part of their argument:"

But in handleExSourceCommand, this is not considered:

https://github.com/hluk/FakeVim/blob/3333aa19a3eefe6b2c565da0b3a055b159d71a2b/fakevim/fakevimhandler.cpp#L6591-L6594

This was originally discovered in cpeditor/cpeditor#828, where `nnoremap c :norm ggVG"+` is sourced and becomes `ggVG` without `"+`.

A quick fix is to detect whether the `"` is at the start of a WORD, and maybe also add a special check for `map`. But it will be better if FakeVim can strictly follow how Vim does 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.