summaryrefslogtreecommitdiff
path: root/vis-lua.c
AgeCommit message (Collapse)Author
2023-07-18Add fullscreen param to vis_pipe_collect() and Lua API vis:pipe()Jörg Bakker
This enables restoring the terminal from a fullscreen command like curses based program. Use cases are e.g. a file picker based on some external program like nnn (https://github.com/jarun/nnn).
2023-06-22Lua API: allow nil in vis:pipe() File and Range parametersJörg Bakker
2023-03-19implement Selection:remove()Jeremy Bobbin
2022-11-29fix miscellaneous spelling mistakesNick Hanley
2022-08-19Revert "vis-lua: support themes in vis:message"Evan Gates
This reverts commit 22d4709e8a30c8feb9b4da7d78e0ea6a57af83e8. erf mentioned[0] that this change broke a plugin. Revert for now until have time to implement it without that bug. [0] https://github.com/martanne/vis/issues/1034
2022-06-15vis-lua: support themes in vis:messageEvan Gates
The commit that added vis:message[0] used the existing vis_message_show function which is used internaly to display lua stack traces. That function uses the internal error_file. vis_event_emit does not trigger events for internal files in order to avoid extra lua errors when already printing a lua stack trace[1]. Due to this setup any usage of vis:message showed the text in a window with default theme/syntax/status bar colors. Instead of using the internal vis_message_show function, create a new window and file that are not marked internal in the same manner as cmd_help so themes are applied. [0]: d815268 (vis-lua: implement vis:message(msg)) [1]: d555c90 (vis: properly redraw status bar of windows displaying internal files)
2020-12-29vis-lua: provide file.permission propertyMarc André Tanner
These are the permission bits of struct stat's st_mode field at the time of the most recent load/save. Close #861
2020-12-10fix typos in commentsMoesasji
2020-09-20Merge branch 'csi_event' of https://github.com/ezdiy/vis into masterMarc André Tanner
2020-09-17vis-lua: provide vis.mark propertyMarc André Tanner
2020-09-17vis-lua: use utility function to translate mark namesMarc André Tanner
2020-09-17vis-lua: provide vis.register propertyMarc André Tanner
2020-09-17vis-lua: use utility function to translate register namesMarc André Tanner
2020-09-17vis-lua: fix mark_names Lua doc indentationMarc André Tanner
2020-09-17Pass up terminal CSI as events to Lua.Ez Diy
2020-08-14vis-lua: fix redraw method name in API documentationMarc André Tanner
2020-08-14vis-lua: make file.modified assignableMarc André Tanner
We fake a modification by doing an insertion followed by a deletion which does not actually change the buffer content. Close #855
2020-02-24vis-lua: implement vis:redraw()Marc André Tanner
2020-02-24lua: fix documentation typos and errorsGeorgi Kirilov
2020-02-10vis-lua: avoid string memory leaks in error caseMarc André Tanner
The function lua_pushstring can throw an error, meaning it will setjmp(3) out thereby leaking the allocated memory. By using lua_newuserdata we let Lua free the memory during a GC run.
2020-02-07lua: add <plugin>/init.lua to package.pathGeorgi Kirilov
2020-02-04vis: make core code more robustMarc André Tanner
The core vis code was originally written under the assumption that there always exists at least one window. However, when being called from the Lua configuration file during start up this is not yet the case. In general, Lua code should always be placed within appropriate event handlers e.g. vis.events.INIT for global configuration. Invoking API functions depending on an active window from top level statements is not supported. Where before the editor simply crashed, these changes turn such code sections into NOPs. Fix #561
2018-05-17vis: simplify C status bar drawing codeMarc André Tanner
2018-05-17vis: display count/input queue content in status barMarc André Tanner
Fix #695
2018-05-17vis-lua: expose current input_queue contentMarc André Tanner
2018-05-16vis: remove v and V in operator pending modeMarc André Tanner
2018-01-01vis-open: fix for absolute and non-existent pathsKelsey Judson
When the shell cannot find any matching files, the glob is not expanded, and vis-open will return the absolute path of the current working directory (because dirname outputs '.'), followed by the filename, followed by a literal '*'. This commit checks that the final path actually exists, and if not, exits with status 1. It also uses text_object_longword for the range to match, so that absolute paths are accepted, and replaced properly (else it only works back to the first '/').
2017-11-21vis-lua: implement window:closeMarc André Tanner
2017-11-21vis-lua: do not enumerate internal windowsMarc André Tanner
This for example skips the command prompt window.
2017-07-23vis-lua: move marks array to window objectMarc André Tanner
Some marks (only '^ right now) are window specific while others have file file scope. This distinction is currently hidden in the API. Before this commit file.marks[...] would always operate on the currently active window.
2017-07-17vis: specify window in mark related APIMarc André Tanner
This should also fix coverity issue 157024.
2017-07-14vis-lua: make selection first class primitives in Lua APIMarc André Tanner
2017-07-11vis: cleanup register related APIMarc André Tanner
Also expose all register slots through the Lua API.
2017-07-11vis-lua: represent marks as array of rangesMarc André Tanner
2017-07-08vis: cleanup marks implementationMarc André Tanner
We now use ' to refer to marks. Mark a is set using 'am and restored using 'aM while this is slightly harder to type than ma and 'a it is consistent with register usage for yank/put and allows a default mark to be used which is handy for quick selection manipulation primitives.
2017-07-07vis: use marks instead of registers to store selectionsMarc André Tanner
The key binding remain the same, but the selections are now stored on a per-buffer basis.
2017-06-27Merge branch 'theme-tweaks-2' of https://github.com/p-e-w/visMarc André Tanner
Conflicts: view.c
2017-06-15view: do not automatically anchor selections when setting rangeMarc André Tanner
2017-06-15vis: rename uses of Cursor to SelectionMarc André Tanner
2017-06-15view: rename view_cursorsMarc André Tanner
2017-06-15view: rename view_cursors_numberMarc André Tanner
2017-06-15view: rename view_cursors_countMarc André Tanner
2017-06-15view: rename view_cursors_nextMarc André Tanner
2017-06-15view: rename view_cursors_selection_clearMarc André Tanner
2017-06-15view: rename view_cursors_selection_getMarc André Tanner
2017-06-15view: rename view_cursors_primary_{get,set}Marc André Tanner
2017-06-10More theme improvementsPhilipp Emanuel Weidmann
2017-05-27vis-lua: avoid nil values in table returned by vis:mappingMarc André Tanner
Also fix compilation with ./configure --disable-help.
2017-05-27vis-lua: expose functions to unmap key bindingsMarc André Tanner
2017-05-27vis-lua: expose currently active key bindings through APIMarc André Tanner
Close #563