diff plugins/core/core.vim @ 17:412c33afd395

Update for core and some minor fixes
author Luka Sitas <lsitas@avatarasoftware.com>
date Fri, 05 Dec 2025 08:48:49 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/core/core.vim	Fri Dec 05 08:48:49 2025 -0500
@@ -0,0 +1,17 @@
+function PopupCommand(command)
+	let buf = term_start(a:command, {'hidden': 1, 'term_finish': 'close'})
+	let winid = popup_create(buf, {'minwidth': 120, 'minheight': 28})
+endfunction
+
+function! ReadOnlyPopup(content)
+  let lines = split(a:content, "\n")
+  let winid = popup_create(lines, {'minwidth':120, 'minheight':28})
+  let buf = winbuf(winid)
+  call setbufvar(buf, '&modifiable', 0)
+  call setbufvar(buf, '&bufhidden', 'wipe')
+endfunction
+
+function! ExecuteCommand(command)
+  " a:command is a shell command string, e.g. 'hg status'
+  return system(a:command . ' 2>&1')
+endfunction