aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-06Disable keymap for movement_key characterMichael Forney1-1/+6
The character following a movement_key command should not be subject to keymap translation since it is used to find characters in the document.
2017-02-05vis: set $vis_file{name,path} environment variables for external commandsMarc André Tanner2-0/+12
2017-02-05vis: add file argument to vis_pipeMarc André Tanner5-10/+14
2017-02-04view: reduce redraws upon selection changesMarc André Tanner1-10/+10
2017-02-04view: keep track of the most recently created cursorMarc André Tanner1-4/+10
Previously this was done implicitly through the primary cursor which was always adjusted when a new cursor is being created. However, this is no longer the case and we do not want to iterate through all cursors when creating a new one. In the longterm we might want to store cursors in a contiguous memory location (i.e. an array) instead of chaising pointers all over the place.
2017-02-04view: do not let new cursors automatically become primaryMarc André Tanner2-9/+12
We currently have the invariant that the primary cursor is always placed within the visisble viewport. Previously view_cursors_new would automatically make the new cursor primary. This in turn causes the viewport to be adjusted triggering lots of unnecessary redraws. As a result commands creating many new selections might become unbearably slow. Instead the caller has to explicitly make the new cursor primary.
2017-02-02test: updateMarc André Tanner1-5/+5
2017-02-02lexer: fix scheme token rule orderingMarc André Tanner1-1/+1
This should fix #412 properly.
2017-02-02map: remove unused functionMarc André Tanner2-15/+0
2017-02-02test: updateMarc André Tanner1-5/+5
2017-02-02vis: support rudimentary help search using :help patternMarc André Tanner2-1/+4
The argument needs to be a valid regular expression. It currently clobbers the last used search term and hence allows repeated searches using `n` and `N` respectively.
2017-02-02Slight code cleanups, use buffer API where appropriateMarc André Tanner3-13/+12
2017-02-02update comment and readme about lua pathChristian Hesse2-6/+7
Commit 3570869c removed the lexers sub directory from the Lua search path. Update the comment and readme to reflect this change.
2017-02-02add /etc/vis to lua path for system-wide configuration by administratorChristian Hesse2-1/+10
2017-02-01test: updateMarc André Tanner1-5/+5
2017-02-01vis: insert new line after linewise change commandsMarc André Tanner1-1/+4
This should also (at least partially) address the issues raised in #440 and #442.
2017-02-01vis: fix repetition of O when given a countMarc André Tanner1-0/+2
The cursor needs to be adjusted after every insertion, not just the first one. The implementation is currently rather ugly because it clobbers the dot register with pseudo keys.
2017-02-01vis: refactor autoindent handlingMarc André Tanner2-37/+45
Rather than inserting a newline and then looking for leading white space of the previous line we now gather the white space before newline insertion. Also we no longer indent empty lines. Close #472
2017-02-01standalone: use git snapshots for attr and aclChristian Hesse1-17/+14
Releases for attr and acl are pretty old and their build systems are really borked. The code in git head looks a lot better, so use that.
2017-02-01Update year number to 2017Marc André Tanner2-3/+3
2017-01-31vis: improve cursor positioning after operators in visual modeMarc André Tanner1-0/+4
Make sure the selection setting code (used to restore selections) does not move the cursor. Fix #479
2017-01-31view: add back link from selection to corresponding cursorMarc André Tanner2-15/+13
Can be NULL if no cursor is associated with the given selection (this is currently never the case). Avoids a loop through all cursors when clearing selections.
2017-01-31sam: optmize transcript insertion for common caseMarc André Tanner2-2/+10
This esentially performs an insertion sort. Rather than iterating the list from the start every time keep track of the latest change and optmize for monotonically increasing file positions.
2017-01-31vis: add workaround for broken color handling in Terminal.appMarc André Tanner6-9/+25
Terminal.app sets $TERM=xterm-256color and ships a corresponding terminfo description advocating that it is capable of color changes to the 256 color palette when in fact it can not. We introduce a new boolean option "change-256colors" which is true by default but can be used to disable color changes. It is automatically set if Terminal.app is detected using $TERM_PROGRAM. This should fix display artifacts as described in #456.
2017-01-31standalone: update lua to version 5.3.4Christian Hesse1-2/+2
2017-01-31standalone: update lpeg to version 1.0.1Christian Hesse1-2/+2
2017-01-31build: properly strip elf executablesChristian Hesse2-7/+11
We had several elf executables that were not stripped properly. Move the filenames to a dedicated variable and use that to not miss anything.
2017-01-28vis: deindent blank autoindented lines when leaving insert modeMarc André Tanner2-2/+18
Does not work for the current implementation of `O` because the "lookbehind" i.e. second to last processed key is `<Up>` and not `<Enter>`. Fix #383
2017-01-28vis: keep track of most recently processed keys of input queueMarc André Tanner3-1/+14
Currently the key handling functions do not know through which mapping they were invoked. As an example the `count` handler exploits the implementation detail that the input queue is stored in contiguous memory, meaning `keys[-1]` gives access to the digit being pressed. This adds infrastructure to keep track of the two most recently processed keys of the input queue. The information is guaranteed to be accurate for the initial invocation of the key handler but will be overwritten in case new keys are pushed to the input queue (e.g. through vis_keys_feed).
2017-01-27vis-digraph: add utility to handle digraphsjosuah6-4/+2113
Hook it up via Lua to <C-k> in insert and replace mode. Close #460 #475
2017-01-27vis-lua: introduce vis:replace functionMarc André Tanner1-0/+20
2017-01-27vis-lua: introduce vis:insert functionMarc André Tanner1-0/+20
2017-01-27vis: do not set count when handling 0 motionMarc André Tanner1-1/+2
A count of zero is different than specifying no count. This fixes `0G` which previously moved to the start of the file. Fix #474
2017-01-26sam: disallow destructive commands in groups and looping constructsMarc André Tanner2-8/+43
This should fix segfaults for commands like `:{ q i/foo/ }` or `:x/pattern/ q` where a command invalidates the current window. The checks are a bit too strict, for example a destructive command at the end of a non-nested group would be fine, but is currently also rejected.
2017-01-26vis: do not repeat insertion while showing promptMarc André Tanner1-1/+2
Previously something like `5ifoo<Escape>:<Escape>` would insert foo into the command prompt.
2017-01-26Merge branch 'standalone' of https://github.com/eworm-de/visMarc André Tanner1-1/+2
2017-01-20test: updateMarc André Tanner1-5/+5
2017-01-20vis: slightly cleanup repeat code, always set dot registerMarc André Tanner4-14/+11
2017-01-20vis: improve new line handling at end of fileMarc André Tanner2-7/+30
<Enter> at the end of the file now inserts two newlines, unless there is already one in place. This ensures that in 'normal' operation the file is always new line terminated (as mandated by POSIX). It also means that there is no problem displaying the right amount of ~ symbols at the end of the file. Unlike in vim the cell beyond the end of the file remains adressable even in normal mode. This means something like the following (starting from an empty file) might be a little confusing: o<Escape><Left>dd Because the starting position is beyond the last newline of the file, nothing will be deleted. For now we prefer to avoid the additional complexity, and difference in behavior between normal and insert mode, needed to fix this slight inconsistency. Fix #294
2017-01-20text: fix EOF handling for text_iterator_byte_nextMarc André Tanner1-1/+1
Handle zero length pieces gracefully. At some point we should write a comprehensive set of unit tests for the iterator API.
2017-01-20standalone: work around borked dependencies in attrChristian Hesse1-1/+2
We already did this change for acl (commit cc551cb0). In attr it shows slightly different symptoms and happens for parallel builds only. The fix is the same.
2017-01-19text-regex: add regex backend based on libtreMarc André Tanner6-4/+179
While memory consumption should be improved, backward searches will still be slow, because they are implemented in terms of repeated forward searches. It needs to be investigated whether the underlying automaton can have its transitions reversed and essentially run backwards, as is the case in sam.
2017-01-19lexer: sync with scintillua changeset 582 rev d70a5ee43d38Marc André Tanner106-119/+131
2017-01-19lexer: update READMEMarc André Tanner1-12/+18
2017-01-19build: more standalone build multilib cleanupMarc André Tanner1-1/+1
2017-01-19vis: make <C-n> in visual mode wrap aroundMarc André Tanner1-6/+13
Strictly speaking we actually not wrap around, but search backwards starting from the first cursor. This is seems more useful when for example renaming a local variable but not starting from its declaration. Close #305
2017-01-19build: try to fix standalone build for multilib systemsMarc André Tanner1-2/+2
2017-01-19standalone: work around borked dependencies in aclChristian Hesse1-1/+2
For any reason acl decides do build getfacl and setfacl on `make [...] install-lib install-dev`, which may fail. Make sure to not fail by installing from libacl and include subdirectories.
2017-01-19vis: simplify count handling for insertionMarc André Tanner3-17/+12
2017-01-19sam: use 'm to reference mark mMarc André Tanner1-3/+3
The manual was already mentioning that. Fix #468