aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-24vis-lua: use better name for error handling functionMarc André Tanner1-2/+2
2017-03-24vis-lua: removed unused function declarationMarc André Tanner1-1/+0
2017-03-24vis-lua: adjust return value validation of called lua functionsMarc André Tanner1-3/+7
While the invoked Lua functions are executed in protected mode, the validation of the return values currently happens in unprotected mode. Thus an invaid return value triggers a lua error and because we currently do not have a global panic handler registered this will terminate the editor process. This commit changes the return value validation to silently fall back to default values instead of raising errors. If we want to provide user friendly stack traces showing the origin of the offending value we would have to move the validation into the Lua code.
2017-03-24vis-lua: validate lua state on vis API entry pointsMarc André Tanner1-9/+27
2017-03-22ui: try to fix job control issues with certain shellsMarc André Tanner3-10/+17
Make sure that curses and libtermkey don't fight over the terminal state. Also send use SIGTSTP instead of SIGSTOP. Previously certain shells (e.g. csh, dash) would get stuck after the editor process was suspended for the second time. Not completely sure whether this is correct, but it seems to work in my limited tests.
2017-03-22text: use proper open(2) flags when saving inplaceMarc André Tanner1-1/+1
This was wrongly changed in commit 74085e92c095d0bf4b98e262cc07ccf9b7dfff3b.
2017-03-22test: updateMarc André Tanner1-5/+5
2017-03-22vis: fix wrap around with <C-n>Marc André Tanner1-0/+2
Do not create an invalid cursor when no further match exists.
2017-03-22vis: do not indent empty lines when right shifting with `>`Marc André Tanner1-2/+5
The exception being when the range is a single line.
2017-03-22view: rename view_dirty to view_invalidateMarc André Tanner3-5/+5
2017-03-22vis: fix syntax highlighting glitches with split windowsMarc André Tanner2-17/+15
When a file was being displayed in multiple windows and changes were performed to the one showing the preceding file region, the syntax highlighting of the window showing the later parts would get messed up.
2017-03-21vis: make `cw` and `cW` more vim compatibleMarc André Tanner2-2/+57
If the starting position is: * on a space or tab use the `w` motion * on the last letter of a word use `l` or `e` depending on whether a count was given. This also applies for single letter words. * otherwise use the `e` motion As in vim `cw` and `dw` behave differently, whether that is desirable remains to be seen. Might fix #521
2017-03-21vis: reject invalid option namesMarc André Tanner1-0/+4
This should fix the ressource leak as found by CID 142510.
2017-03-19vis-lua: allow operators to be defined as lua functionsMarc André Tanner2-0/+98
2017-03-19vis: add infrastructure for user specified operatorsMarc André Tanner4-5/+35
2017-03-19view: use correct default cell styleMarc André Tanner1-4/+3
2017-03-19Move :set horizon option implementaiton to luaMarc André Tanner8-20/+14
2017-03-19Move :set theme option implementation to luaMarc André Tanner6-37/+3
2017-03-19Move :set syntax option implementation to luaMarc André Tanner10-134/+55
It is no longer possible to change the used syntax by assigning to the `win.syntax = name` field, instead the function win:set_syntax(name)` should be called. The distinction between filetype and syntax lexer to use should probably be clarified/cleaned up at some point.
2017-03-19vis-lua: make vis.win return nil if no window exists yetMarc André Tanner1-2/+4
This is only the case during editor startup before the first window is created.
2017-03-19vis-lua: expose option_unregister functionMarc André Tanner1-0/+16
2017-03-19vis-lua: expose option_register functionMarc André Tanner1-0/+54
2017-03-19vis: add infrastructure to dynamically add :set optionsMarc André Tanner4-54/+127
2017-03-19vis: make sure g_ does not cross line boundariesMarc André Tanner1-8/+2
This also eliminates dead code as reported by CID 142387.
2017-03-19Fix errors and add ANS Forth 2012 keywordsstutonk1-17/+31
Added all ANS Forth 2012 keywords as defined at http://lars.nocrew.org/forth2012/core.html and removed keywords that were not part of the standard. This necessitated rewriting most of the Strings rules as well as removing some rules not consistent with the standard. Only the s\" form should allow escaping. The list of characters which may appear as part of a keyword has also been expanded where appropriate. Because '.' is a keyword as well as the first chatacter in a string pattern, strings must now be given parsing precedence over keywords to ensure proper highlighting. A few errors were also fixed such as moving the true (which should make keywords case-insensitive) within the word_match function's closing paren. Parens have been removed from the operator list and moved to their correct place as the delimiters for block comments.
2017-03-18Recognize additional Forth filetypestutonk1-1/+1
2017-03-17man: fix last mandoc linting warningMarc André Tanner1-1/+1
2017-03-17Merge branch 'master' of https://github.com/josuah/visMarc André Tanner1-377/+533
2017-03-17vis: fix selection background colorMarc André Tanner1-1/+1
2017-03-17ui: explicitly initialize cell matrix after resizeMarc André Tanner1-0/+1
2017-03-17ui: fix vt100 compilationMarc André Tanner1-10/+10
2017-03-16build: include dvtm terminfo entries in standalone buildsMarc André Tanner1-8/+10
2017-03-16ui: further cleanup display codeMarc André Tanner5-40/+23
2017-03-16man/vis.1: semantic macros, homogenize formatJosuah Demangeon⠠⠵1-377/+533
vis.1: added modes description
2017-03-16view: mark view as dirty even when resizing to same sizeMarc André Tanner1-1/+3
This makes sure that a successive view_update call returns true and as a result the status bar will be correctly redrawn.
2017-03-16vis: remove unnecessary status bar redrawMarc André Tanner1-2/+0
There is no longer a need to explicitly redraw the window status bar upon a mode change, it will happen anyway during the next UI update.
2017-03-16vis: remove special case when invalidating windowsMarc André Tanner1-2/+1
There is no need to treat the currently focused window specially.
2017-03-16ui: fix display artifacts in info lineMarc André Tanner1-10/+10
We need to clear the info line before displaying a new message, otherwise parts of the old cell contents might remain visible.
2017-03-15test: updateMarc André Tanner1-5/+5
2017-03-15build: clarify lpeg related configure optionMarc André Tanner1-4/+4
2017-03-15Fix README markdown and improve contribution sectionMarc André Tanner1-11/+27
2017-03-15ui: fix compiler warningMarc André Tanner2-2/+2
2017-03-15Make Vis' Solarized theme match the official Vim one.Tim Allen1-2/+2
2017-03-15ui: add some bound checksMarc André Tanner1-0/+4
2017-03-15travis: add non-curses builds to test matrixMarc André Tanner1-0/+6
This ensures that the configuration at least compiles.
2017-03-14Add experimental raw vt100 UI backendMarc André Tanner8-31/+273
The intention of this is not to slowly reimplement curses but to provide a minimal working terminal UI backend which can also be used for debugging, fuzzing and in environments where curses is not available. Currently no attempt is made to optimize terminal output. The amount of flickering will depend on the smartness of your terminal emulator.
2017-03-14Restructure display codeMarc André Tanner18-1122/+1306
Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces.
2017-03-07standalone: use stronger hashing algorithm for source verificationChristian Hesse1-16/+16
2017-03-07lua: add filetype detection for Plan9 rc and derivativesDavid B. Lamkins1-0/+3
Close #513
2017-03-07travis: add TRE regex backend to test matrix of travis-ci linux buildsMarc André Tanner1-0/+4
The libtre5 package got approved / white listed for container builds in: travis-ci/apt-package-whitelist#4023 travis-ci/apt-package-whitelist#4024