Skip to content

Commit

Permalink
debug: fix double substitution for paths in goto_file from stacktrace…
Browse files Browse the repository at this point in the history
… window

When the content of the stacktrace window is computed in s:show_stacktrace(),
s:substituteRemotePath() is already used to map remote paths to local paths.
goto_file() is intended to jump to the desired location in the source code which
resides on the local machine. Thus it should use the _local_ path and not
translate the path back to the remote version.
  • Loading branch information
gremat committed Aug 2, 2024
1 parent a64d097 commit bc93992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/go/debug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ function! s:goto_file() abort
return
endif
call win_gotoid(win_getid(bufs[0][0]))
let filename = s:substituteLocalPath(m[1])
let filename = m[1]
let linenr = m[2]
let oldfile = fnamemodify(expand('%'), ':p:gs!\\!/!')
if oldfile != filename
Expand Down

0 comments on commit bc93992

Please sign in to comment.