@@ -7,22 +7,6 @@ local M = {}
77-- displaying different columns, so building a general purpose `ps` matcher is not trivial.
88-- Perhaps one way to do that is to declare a new command and pass the selected line(s) to it.
99
10- -- This is based on https://github.com/Robitx/gp.nvim/commit/5ccf0d28c6fbc206ebd853a9a2f1b1ab9878cdab
11- local undojoin = function (buf )
12- if not buf or not vim .api .nvim_buf_is_loaded (buf ) then
13- return
14- end
15- vim .api .nvim_buf_call (buf , function ()
16- local status , result = pcall (vim .cmd .undojoin )
17- if not status then
18- if result :match (" E790" ) then
19- return
20- end
21- M .error (" Error running undojoin: " .. vim .inspect (result ))
22- end
23- end )
24- end
25-
2610local JumpDown = function (bufnr )
2711 local curr_buf = vim .api .nvim_get_current_buf ()
2812 vim .api .nvim_buf_call (bufnr , function ()
@@ -45,8 +29,6 @@ local genericStart = function(opts)
4529
4630 local modeline_counter = 0
4731 local insert_output = function (bufnr , fd , data )
48- -- undojoin(bufnr) -- I don't need to mess with the undo history, it is already good
49- -- check if bufnr still exists
5032 if vim .api .nvim_buf_is_loaded (bufnr ) == false then
5133 return
5234 end
@@ -213,9 +195,9 @@ M.setup = function(_)
213195
214196 local commandline_hl_ns = vim .api .nvim_create_namespace (' shellpad_commandline' )
215197
216- local highlight_basics = function (buf )
217- vim .api .nvim_buf_clear_namespace (buf , commandline_hl_ns , 0 , 1 )
218- vim .api .nvim_buf_add_highlight (buf , commandline_hl_ns , " shellpad_commandline" , 0 , 0 , - 1 )
198+ local highlight_basics = function (bfr )
199+ vim .api .nvim_buf_clear_namespace (bfr , commandline_hl_ns , 0 , 1 )
200+ vim .api .nvim_buf_add_highlight (bfr , commandline_hl_ns , " shellpad_commandline" , 0 , 0 , - 1 )
219201 end
220202
221203 highlight_basics (buf )
0 commit comments