Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
neovim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
importd
neovim
Commits
df297e3c
Unverified
Commit
df297e3c
authored
1 year ago
by
zeertzjq
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(runtime): don't set gx mapping if already mapped (#24262)
This matches netrw's use of maparg().
parent
317038e7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/plugin/nvim.lua
+10
-6
10 additions, 6 deletions
runtime/plugin/nvim.lua
with
10 additions
and
6 deletions
runtime/plugin/nvim.lua
+
10
−
6
View file @
df297e3c
...
...
@@ -36,9 +36,13 @@ local function do_open(uri)
vim
.
notify
(
err
,
vim
.
log
.
levels
.
ERROR
)
end
end
if
vim
.
fn
.
maparg
(
'gx'
,
'n'
)
==
''
then
vim
.
keymap
.
set
({
'n'
},
'gx'
,
function
()
do_open
(
vim
.
fn
.
expand
(
'<cfile>'
))
end
,
{
desc
=
gx_desc
})
end
if
vim
.
fn
.
maparg
(
'gx'
,
'x'
)
==
''
then
vim
.
keymap
.
set
({
'x'
},
'gx'
,
function
()
do_open
(
get_visual_selection
())
end
,
{
desc
=
gx_desc
})
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment