aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-28[vis-menu] Add a manpage.Tim Allen2-1/+255
Unlike the existing vis(1) manpage, this uses the `mdoc` macro set because it's (very slightly) more modern, and OpenBSD only supports `mdoc` while everybody else supports both.
2016-05-28[vis-menu] Remove unused keybinding.Tim Allen1-4/+0
I'm guessing at some point slmenu's author wanted to make the various deletion commands move text to a kill-buffer, and then Insert and Control-Y could yank from it back into the text field. That clearly never happened, though, so this is dead code.
2016-05-26ui: properly redraw status line when window focus changesMarc André Tanner1-1/+4
2016-05-26vis: use normalized absolute file names as internal representationMarc André Tanner5-30/+77
Try to display a shorthand version in the status bar, this currently only works for files below the current working directory of the editor process.
2016-05-24vis-lua: cleanup Lua status bar display codeMarc André Tanner3-17/+22
2016-05-24vis: cleanup C status bar display codeMarc André Tanner1-18/+69
2016-05-24Add utility function to calculate display width of a stringMarc André Tanner2-0/+40
This is based on the implementation of text_line_width_get from text-motions.c. There might be an opportunity for code sharing.
2016-05-24vis-lua: improve error handling when loading visrc.luaMarc André Tanner1-3/+25
If loading fails because visrc.lua is not found, then simply display an information message. However if there is a syntax error, display a complete stack trace. This fixes commit 352155889aad57f8cb6d20317ffef81073fb6533.
2016-05-24vis-lua: add debug infrastructure to trace object lifetimeMarc André Tanner1-16/+108
Output will be printed to stdout and can be enabled by: $ make debug CFLAGS=-DDEBUG_LUA=1 $ ./vis > log This commit also tries to make object creation slightly more robust.
2016-05-22vis: only display mode in status bar of active windowMarc André Tanner2-3/+4
2016-05-22vis-lua: introduce light references for short lived objectsMarc André Tanner1-7/+20
Light object references are used to type check, but contrary to full object references they are not stored in the Lua registry. This means that they are not bound to the object lifetime of their corresponding C object. Hence such objects must not be used after they have been free(3)-ed by the editor core. Such lightweight object references are always re-created, thus custom properties will not be stored across subsequent accesses. For now light object references are only used for cursor objects. This should ix the crashes introduced by the recent changes which make heavy use of the Lua API.
2016-05-22Add a newline at the end of the fileSilvan Jegen1-1/+1
This is encouraged by the ISO C99 standard.
2016-05-22Remove unneeded header importSilvan Jegen1-1/+0
2016-05-22vis: load default styles even for unknown file typesMarc André Tanner1-8/+11
2016-05-22vis-lua: fall back to C status bar handling if the Lua implementation is not ↵Marc André Tanner1-17/+20
available
2016-05-22vis-lua: do not report errors recursivelyMarc André Tanner2-0/+5
Displaying an error might create a new window which in turn can trigger new events (all other windows are resized+redrawn) which might again cause errors. There is still no sane way to exit the editor in this case, but at least the error messages should be readable.
2016-05-22vis: refactor status line handlingMarc André Tanner11-62/+125
Make window status bar content configurable via Lua.
2016-05-22vis-lua: add win:status functionMarc André Tanner2-0/+11
2016-05-22vis: add function to change window statusbar contentMarc André Tanner4-0/+20
2016-05-22vis-lua: add vis.recording propertyMarc André Tanner2-0/+5
2016-05-22vis-lua: add window.{width, height} read only propertiesMarc André Tanner2-0/+11
2016-05-22vis: add functions to query window sizeMarc André Tanner4-0/+23
2016-05-22vis-lua: add vis.VERSION propertyMarc André Tanner2-0/+4
It is a string in `git describe` format, as reporte by `vis -v`.
2016-05-22vis: consider :set horizon setting when syntax highlightingMarc André Tanner9-22/+11
2016-05-22lexer: return nil if lexer loading failsMarc André Tanner1-2/+1
2016-05-22vis: move syntax highlighting to pure Lua codeMarc André Tanner12-210/+152
2016-05-22vis-lua: add window.viewport rangeMarc André Tanner2-0/+8
2016-05-22vis-lua: add bindings for new view style functionsMarc André Tanner2-0/+46
2016-05-22view: add functions to style a file rangeMarc André Tanner2-0/+38
2016-05-22ui: s/UiStyles/UiStyle/gMarc André Tanner4-4/+4
2016-05-22vis-lua: cleanup vis.MODE_* constants handlingMarc André Tanner1-30/+19
2016-05-22vis: always start vis-menu with -b flagMarc André Tanner2-5/+5
2016-05-22We don't use slmenu, so don't mention it.Tim Allen1-3/+2
2016-05-22vis-menu: do not segfault if an option lacks an argumentTim Allen1-4/+16
2016-05-20implement xread() and wrap read() + die()Christian Hesse1-9/+16
2016-05-20ignore vis-menuChristian Hesse1-0/+1
2016-05-19vis-menu: remove unused codeMarc André Tanner1-4/+0
2016-05-19build: check for Lua >= 5.2 in configure scriptMarc André Tanner1-1/+5
The generic lua pkg-config name also match for Lua 5.1 which then results in a linker error because the necessary functions are not available.
2016-05-19build: let make debug compile vis-menu with debug flagsMarc André Tanner1-4/+5
2016-05-19vis-menu: fix matching order, exact matches should come firstMarc André Tanner1-1/+1
This reverts 09d0a36e0370f7ca9bdb171bf93c5ac3131c5a92 from the dmenu repository, although dmenu itself seems to work correctly. $ printf "foobar\nfoo\n" | ./vis-menu Typing foo should select foo not foobar.
2016-05-19vis-menu: import token based match function from dmenuMarc André Tanner1-30/+43
2016-05-19vis-menu: interpret non-option argument as an initial prompt valueMarc André Tanner1-1/+5
2016-05-19vis-menu: change version outputMarc André Tanner2-2/+2
2016-05-19vis-menu: remove X clipboard supportMarc André Tanner1-6/+0
2016-05-19Import slmenu 7e74fa5 as vis-menuMarc André Tanner3-37/+605
2016-05-19vis: tweak completion commandsMarc André Tanner1-4/+4
Change tr command to split words, this won't properly work with Unicode but should at least avoid unwanted non-word symbols and be POSIX conformant. A possible alternative would be to use grep -o -E '\w+' while the -o option is not part of POSIX it seems to be mostly supported. However the \w regex syntax might not be supported. Force ls(1) output to be linewise and surpress the same prefix. Change sed invocation to only replace proper prefixes.
2016-05-19Merge branch 'lexer-add-crystal' of https://github.com/soveran/visMarc André Tanner2-0/+143
2016-05-19lexer: add crystalMichel Martens2-0/+143
2016-05-19vis: fix behavior of complete-word on BSDMichel Martens1-2/+2
2016-05-18vis-lua: fail more silently when visrc.lua can not be loadedMarc André Tanner1-1/+2
This prevents opening a separate window to display a full stack trace and improves usage of a vis binary compiled with lua support on a system without the necessary *.lua files.