summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-12-23text-objects: explicitly ignore return value of strtoll(3)Marc André Tanner
We are only interested in the first invalid character.
2016-12-23Apply format string attribute to printf style functionsMarc André Tanner
Not strictly C99 conform, but widely supported and easy enough to NOP for compilers which do not support it. Besides it was already used to mark certain functions as noreturn.
2016-12-23text: make text_vprintf static, it is only used within text.cMarc André Tanner
2016-12-22text: remove Filepos typedefMarc André Tanner
The idea might be good, but it was almost unused.
2016-12-22text: introduce EMARK to denote an invalid markMarc André Tanner
Technically this macro name is in the reserved namespace of errno.h. The same is true for EPOS. Maybe we should rename them at some point, but for now the short names are convenient. Fix #443 Close #444
2016-12-22test: updateMarc André Tanner
2016-12-22vis-lua: store Vis context in upvalues where neededMarc André Tanner
2016-12-22text: change datatype of Mark to uintptr_tMarc André Tanner
This should avoid undefined pointer comparisons.
2016-12-22text: make default block size overridable via C pre-processorMarc André Tanner
This will be used for unit test purposes to force more allocations.
2016-12-22buffer: make default buffer size overridable via C pre-processorMarc André Tanner
2016-12-22text: avoid undefined multiple accesses in expressionMarc André Tanner
Work around for a (bogus?) tis-interpreter warning.
2016-12-22text: do not rely on indeterminate value in a comparisonMarc André Tanner
2016-12-22build: do not install lua/doc directoryMarc André Tanner
2016-12-22build: also include working tree state in version informationMarc André Tanner
2016-12-21vis: implement `gh` and `gl` to move by relative byte offsetsMarc André Tanner
2016-12-21vis: implement `go` to move to absolute byte positionMarc André Tanner
2016-12-21vis: implement g8Marc André Tanner
Shows hex values up to the next UTF-8 encoded character.
2016-12-20vis: improve literal insertion via <C-v> in insert modeMarc André Tanner
2016-12-20vis: improve gaMarc André Tanner
2016-12-20ui: increase maximum info message lengthMarc André Tanner
2016-12-20buffer: implement buffer_capacity utility functionMarc André Tanner
2016-12-20buffer: implement buffer_appendf to append formatted contentMarc André Tanner
2016-12-20buffer: fix error case in buffer_append0Marc André Tanner
Do not change buffer length when failing to append.
2016-12-19vis-lua: implement vis.registers[] arrayMarc André Tanner
Notice that currently only single letter register names/array indices are supported. Register handling needs to be cleaned up at some point.
2016-12-19vis: introduce vis_register_from utility functionMarc André Tanner
2016-12-19vis-lua: simplify obj_ref_new error handlingMarc André Tanner
2016-12-19vis-lua: simplify object reference checkingMarc André Tanner
Make obj_ref_check handle invalid object references. The luaL_argerror function throws a Lua error and never returns, hence all return value checks become obsolete.
2016-12-19vis-lua: implement file.marks[] arrayMarc André Tanner
We need to retrieve a pointer to the File struct but can not store it directly in the Lua uservalue because the address is already used for the regular file object (of type vis.file). For now we use file->marks as an address and then use offsetof to retrieve the start of the struct.
2016-12-19vis-lua: implement file:mark_{get,set}Marc André Tanner
2016-12-17test: updateMarc André Tanner
2016-12-17vis: allow boolean :set options to be toggledMarc André Tanner
Boolean options can be toggled by appending `!` to the option name. Close #435
2016-12-17vis: always remove consumed keys from input queueMarc André Tanner
When given a mapping like: :map! insert >> ><>x> whose end is a prefix of another mapping we should still remove all already consumed keys from the input queue. Fixes #436
2016-12-16travis: try to enable code coverage for test/coreMarc André Tanner
2016-12-16build: update unused make standalone/local Lua reference to 5.3.3Marc André Tanner
2016-12-16vis: process keys following an unmatched prefix individuallyMarc André Tanner
Fixes #434
2016-12-16vis: add section about compile time configuration to :help outputMarc André Tanner
2016-12-15build: move $CFLAGS_DEBUG into config.mkMarc André Tanner
This allows inclusion in other Makefiles (e.g. for C unit tests).
2016-12-15vis: always store registers values NUL terminatedMarc André Tanner
Previously we only made sure that the register content is NUL terminated when reading it out. This made it impossible to distinguish between an empty register and one which stores a single NUL byte. Now the in memory representation of a non-empty register is always NUL terminated. When appending we temporarily remove the trailing NUL byte and restore it later. This should fix put commands of a previously yanked single NUL byte.
2016-12-15vis: respect terminating NUL bytes in the input queueMarc André Tanner
It can happen that the Buffer content used for the input queue becomes <\000> where the NUL byte is intended to terminate the queue, but termkey happily parses it and because it is delimited by < and > on both sides we then interpret it as a key. In input mode this leads to the insertion of a NUL byte which is displayed as ^@. Close #432
2016-12-15vis: more informative error message for :set optionJosh Wainwright
Close #433
2016-12-14lua: make sure we always load a default themeMarc André Tanner
2016-12-14lua: improve error message when failing to load lpeg/lexer moduleMarc André Tanner
Differentiate between the case where the module is not found and the case where an error occured while loading it. This should make it easier to debug cases in which there is a Lua version mismatch between vis and lpeg.
2016-12-14vis: remove useless NULL checkMarc André Tanner
The very first thing we do if that check is false, is return from the function.
2016-12-14build: improve description of --enable-lpeg configure optionMarc André Tanner
It links lpeg statically into the vis binary, meaning it does not need to be dlopen(3)-ed at runtime. While this improves the portability of the resulting vis binary, it is not necessary to enable this option to get syntax highlighting support. Maybe the option should be renamed to avoid further confusion.
2016-12-14lua: avoid errors if no theme is setMarc André Tanner
Close #429
2016-12-14lua: add crontab file type and configure it to save in-placeMarc André Tanner
This should fix isses with `crontab -e` editing.
2016-12-14lua: allow per file type :commands being executedMarc André Tanner
2016-12-14lua: use Lua patterns to match file extensionsMarc André Tanner
2016-12-14vis: add new :set savemethod auto|atomic|inplace optionMarc André Tanner
Specifies how the current file should be saved, `atomic` which uses rename(2) to atomically replace the file, `inplace` which truncates the file and then rewrites it or `auto` which tries the former before falling back to the latter. The rename method fails for symlinks, hardlinks, in case of insufficient directory permissions or when either the file owner, group, POSIX ACL or SELinux labels can not be restored. The option defaults to `auto`.
2016-12-14text: expose text save method to calling codeMarc André Tanner
There are cases where it is useful to specify how the file should be saved.