summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-08text: simplify \r\n handlingMarc André Tanner
2017-04-08text: introduce text_char_get which converts \r\n to \nMarc André Tanner
2017-04-08text: fix iterator semantics regarding windows style newlinesMarc André Tanner
At some point we might drop this mess and ask users to rely upon dos2unix(1) and unix2dos(1), respectively.
2017-04-06test: updateMarc André Tanner
2017-04-06vis: fix memory leak in selection rotation codeMarc André Tanner
2017-04-06sam: properly free transcript in error caseMarc André Tanner
2017-04-06Fix formatting in man pageTwoFinger
2017-04-04vis: remove unused struct memberMarc André Tanner
2017-04-04vis: do not remove indentation of non-empty linesMarc André Tanner
Fix #532
2017-04-04vis: add motions to move by codepointsMarc André Tanner
Some people might prefer this for <Backspace> behavior. Except for that and debugging purposes using `ga` and `g8` it is not yet that useful.
2017-04-04vis: automatically dispose invalid cursorsMarc André Tanner
2017-04-04vis: reject multi letter mark and register namesMarc André Tanner
Fix #531
2017-04-02Fix Debian package lintian warningsMarc André Tanner
https://mentors.debian.net/package/vis
2017-03-31text: Add missing va_end() whenRaúl Peñacoba
vsnprintf fails
2017-03-31vis: improve tab completion in command promptMarc André Tanner
At some point it should probably be possible to add command prompt bindings from within Lua. Currently there is no easy/realiable way to detect the prompt window. Should improve #526.
2017-03-31lexers: sync with scintillua changeset 600 rev fdeca0b808bfMarc André Tanner
I think the default value for the cache argument to the lexer load function should be true, not false. Optimize for the common case. This makes the API ugly/harder to use. But for now we follow upstream.
2017-03-31vis: add non-default actions for vi compatible n/N motionsMarc André Tanner
The following key mappings should result in the vi behavior: :map! normal n <vis-motion-search-repeat> :map! normal N <vis-motion-search-repeat-reverse> The default remains unchanged, that is `n` (`N`) always searches towards the end (start) of the file. Fix #470
2017-03-31vis: rename search related constantsMarc André Tanner
2017-03-31Add more wiki references to the READMEMarc André Tanner
2017-03-31Use a minimal POSIX shar implementation for self extracting executableMarc André Tanner
This only requires POSIX shell utilies for extraction. The resulting archive is bigger (it is not gzip compressed) and startup will be slower due to many spawned processes.
2017-03-27Prefer Lua 5.3Klemens Nanni
2017-03-27build: add git based version information backMarc André Tanner
2017-03-25build: set version to 0.3Marc André Tanner
2017-03-25Merge branch 'master' of https://github.com/joshaw/visMarc André Tanner
2017-03-24lexers: fix perl pattern for horrible regex linesS. Gilles
Under presently-not-precise circumstances, regex patterns longer than a screenful can cause first_match_pos to be nil. In this sutation, evaluating `first_match_pos - 1' will be an error, so jump to matchless case.
2017-03-24vis: properly redraw status bar of windows displaying internal filesMarc André Tanner
Currently the only "internal window" with a status bar is the information window used to display Lua stack traces. We do not want to trigger events for it, because that could result in further Lua errors. Nonetheless its status bar should be properly redrawn to avoid display artifacts. That is why we fall back to the built-in default status bar as used by non-Lua builds.
2017-03-24vis-lua: register a panic handlerMarc André Tanner
The intention here is to catch any errors in unprotected mode, close the lua state and jump back to the mainloop to give the user the opportunity to take care of unsaved changes. We abuse the infrastructure Lua provides for custom memory allocators to associate our vis instance pointer with the lua state. In the panic handler we can then use lua_getallocf to get our context back. The actual memory allocater is equivalent to the one used by default and just forwards everything to the libc.
2017-03-24vis-lua: use better name for error handling functionMarc André Tanner
2017-03-24vis-lua: removed unused function declarationMarc André Tanner
2017-03-24vis-lua: adjust return value validation of called lua functionsMarc André Tanner
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é Tanner
2017-03-22ui: try to fix job control issues with certain shellsMarc André Tanner
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-22vis-lua: add usage documentation to command_registerJosh Wainwright
2017-03-22text: use proper open(2) flags when saving inplaceMarc André Tanner
This was wrongly changed in commit 74085e92c095d0bf4b98e262cc07ccf9b7dfff3b.
2017-03-22test: updateMarc André Tanner
2017-03-22vis: fix wrap around with <C-n>Marc André Tanner
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é Tanner
The exception being when the range is a single line.
2017-03-22view: rename view_dirty to view_invalidateMarc André Tanner
2017-03-22vis: fix syntax highlighting glitches with split windowsMarc André Tanner
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é Tanner
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é Tanner
This should fix the ressource leak as found by CID 142510.
2017-03-19vis-lua: allow operators to be defined as lua functionsMarc André Tanner
2017-03-19vis: add infrastructure for user specified operatorsMarc André Tanner
2017-03-19view: use correct default cell styleMarc André Tanner
2017-03-19Move :set horizon option implementaiton to luaMarc André Tanner
2017-03-19Move :set theme option implementation to luaMarc André Tanner
2017-03-19Move :set syntax option implementation to luaMarc André Tanner
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é Tanner
This is only the case during editor startup before the first window is created.
2017-03-19vis-lua: expose option_unregister functionMarc André Tanner
2017-03-19vis-lua: expose option_register functionMarc André Tanner