diff options
| author | Florian Fischer <gitlab@muhq.space> | 2023-11-21 15:50:00 +0000 |
|---|---|---|
| committer | Florian Fischer <gitlab@muhq.space> | 2023-11-21 15:50:00 +0000 |
| commit | 418167354031ae75c55042574764745a7a825e8f (patch) | |
| tree | 9a86053d514946e99a65fd65a344568d3b6964e0 /init.lua | |
| parent | 754dad10d3a8434d0c23f919b592d76aa32ace46 (diff) | |
| parent | 17e40a5be84b51fa004a985c004d3ff34e477662 (diff) | |
| download | vis-lspc-418167354031ae75c55042574764745a7a825e8f.tar.gz vis-lspc-418167354031ae75c55042574764745a7a825e8f.zip | |
Merge branch 'fix-doc-history' into 'main'
Fix lscp.open_file not actually adding to history
See merge request muhq/vis-lspc!45
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -428,10 +428,6 @@ local function vis_open_doc_pos(doc_pos, cmd, win) end end -lspc.open_file = function(win, path, line, col, cmd) - vis_open_doc_pos({file = path, line = line, col = col}, cmd or 'e', win) -end - -- Support jumping between document positions -- Stack of edited document positions local doc_pos_history = {} @@ -451,6 +447,10 @@ local function vis_open_new_doc_pos(doc_pos, cmd, win) vis_open_doc_pos(doc_pos, cmd, win) end +lspc.open_file = function(win, path, line, col, cmd) + vis_open_new_doc_pos({file = path, line = line, col = col}, cmd or 'e', win) +end + local function vis_pop_doc_pos(win) local last_doc_pos = table.remove(doc_pos_history) if not last_doc_pos then |
