aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2024-05-23 23:30:53 +0300
committerGitHub <noreply@github.com>2024-05-23 15:30:53 -0500
commit0a2218f965ac8cd7967d33b8c52e5b06fb284aac (patch)
tree69d79f792771da62a27c565cc1045287fd9ec40d /src/nvim/regexp.c
parentc614969570ac13cfc1ff6642fcaf56ebce6d40be (diff)
downloadrneovim-0a2218f965ac8cd7967d33b8c52e5b06fb284aac.tar.gz
rneovim-0a2218f965ac8cd7967d33b8c52e5b06fb284aac.tar.bz2
rneovim-0a2218f965ac8cd7967d33b8c52e5b06fb284aac.zip
fix(comment): fall back to using trimmed comment markers (#28938)
Problem: Currently comment detection, addition, and removal are done by matching 'commentstring' exactly. This has the downside when users want to add comment markers with space (like with `-- %s` commentstring) but also be able to uncomment lines that do not contain space (like `--aaa`). Solution: Use the following approach: - Line is commented if it matches 'commentstring' with trimmed parts. - Adding comment is 100% relying on 'commentstring' parts (as is now). - Removing comment is first trying exact 'commentstring' parts with fallback on trying its trimmed parts.
Diffstat (limited to 'src/nvim/regexp.c')
0 files changed, 0 insertions, 0 deletions