aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-09Remove regex section from READMEMarc André Tanner1-22/+0
By now we have efficient forward searches using the TRE regex backend. Further improvements can be discussed in #488. Close #260
2017-02-08vis: improve <C-d> and <C-t> implementation in insert modeMarc André Tanner1-2/+2
Fix #487
2017-02-08vis: fix cursor positioning after :helpMarc André Tanner1-0/+1
2017-02-08vis: make `ga` and `g8` more robustMarc André Tanner1-1/+5
Fixes CID 141179
2017-02-08vis-menu: check read(2) return valueMarc André Tanner1-1/+2
Fixes CID 137371
2017-02-08vis-digraph: properly initialize local variableMarc André Tanner1-1/+1
Fixes CID 141180
2017-02-08test: updateMarc André Tanner1-5/+5
2017-02-08text: clean up iterator semanticsMarc André Tanner2-46/+69
We now guarantee the existence of at least one non-sentinel piece at all time and allow iterators to recover from these delimiting pieces.
2017-02-08sam: execute commands even if we have no valid rangeMarc André Tanner1-2/+3
In an ideal world this should never happen. However, if for some reason all cursors/selections become invalid, default to an empty range. This at least allows to terminate the editor gracefully whereas before the command would silently be ignored.
2017-02-08text: remove special case for marks at start of fileMarc André Tanner1-4/+0
Unlike EOF address 0 needs no special treatment.
2017-02-08view: fix view_cursors_scroll_to to operate on current stateMarc André Tanner1-0/+1
This should fix display issues when entering the first newline of a file.
2017-02-08vis: make sure prompt starts newline terminatedMarc André Tanner1-7/+8
2017-02-07Allow {} to be nested in shell variablesS. Gilles1-1/+1
This allows lines like : ${FOO:="${bar}/baz"} to be highlighted correctly.
2017-02-07test: updateMarc André Tanner1-5/+5
2017-02-07vis: improve text object handlingMarc André Tanner3-5/+16
Fix `gN` and delimited inner variants when given a count.
2017-02-07vis: reformat text object definitionsMarc André Tanner3-33/+107
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.