aboutsummaryrefslogtreecommitdiffhomepage
path: root/input.h
Commit message (Collapse)AuthorAge
* Change lookahead_list into a queueGravatar Sanne Wouda2015-04-19
| | | | | | | | | | | | | | Using builtin `commandline -f`, one would expect to have commands executed in the order that they were given. This motivates the change to a queue. Unfortunately, fish internals still need lookahead_list to act as a stack. Add and rename functions to support both cases and have lookahead_list as a std::deque internally. This code is delicate, and we should probably dog-food this in nightly for a while before the next-minor release. Fixes #1567
* Rework mode handling of `bind`Gravatar Kevin Ballard2014-09-22
| | | | | | | | | | | | | Binds with the same sequence in multiple modes was not working right. Fix up the implementation to propagate modes everywhere as necessary. This means that `bind` will properly list distinct binds with the same sequence, and `bind -e` will take mode into account properly as well. Note that `bind -e seq` now assumes the bind is in the default bind mode, whereas before it would erase the first binding with that sequence regardless of mode. `bind -e -a` still erases all binds in all modes, though `bind -M mode -e -a` still only erases all binds in the selected mode.
* R_MAX should be R_CANCEL nowGravatar Kevin Ballard2014-09-21
|
* Initial work to support for term-24bit ("true color")Gravatar ridiculousfish2014-09-19
|
* Fix `commandline` behavior in bind functionsGravatar Kevin Ballard2014-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a key is bound to a fish function, if that function invokes `commandline`, it gets a stale copy of the commandline. This is because any keys passed to `self-insert` (the default) don't actually get added to the commandline until a special character is processed, such as the R_NULL that gets returned after running a binding for a fish command. To fix this, don't allow fish commands to be run for bindings if we're processing more than one key. When a key wants to invoke a fish command, instead we push the invocation sequence back onto the input, followed by an R_NULL, and return. This causes the input loop to break out and update the commandline. When it starts up again, it will re-process the keys and invoke the fish command. This is primarily an issue with pasting text that includes bound keys in it. Typed text is slow enough that fish will update the commandline between each character. --- I don't know of any way to write a test for this, but the issue can be reproduced as follows: > bind _ 'commandline -i _' This binds _ to a command that inserts _. Typing the following works: > echo wat_is_it But if you copy that line and paste it instead of typing it, the end result looks like > _echo wat_isit With this fix in place, the pasted output correctly matches the typed output.
* bind should not show -k for bindings that are escape sequences, not keysGravatar ridiculousfish2014-07-07
|
* Run restyle.sh to enforce style rules.Gravatar ridiculousfish2014-03-31
|
* Changes to bind_mode implementation based on code review and mergeGravatar ridiculousfish2014-03-30
| | | | errors
* Merge branch 'master' into 1218_rebaseGravatar ridiculousfish2014-03-29
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: builtin.cpp builtin_commandline.cpp highlight.cpp input.cpp input.h reader.cpp screen.cpp screen.h
| * Test and fix issue where, if binding X is a prefix of binding Y, and XGravatar ridiculousfish2014-02-12
| | | | | | | | | | | | | | is specified before Y, then Y will never be invoked because X will always get there first. Now instead we order bindings in descending order by length, so that we always test the binding before any others that prefixes it. Fixes #1283.
| * Support escape or up-arrow to cancel the completion search field.Gravatar ridiculousfish2014-01-27
| |
| * Increased support for completion search field. Use btab (shift-tab) toGravatar ridiculousfish2014-01-27
| | | | | | | | complete-and-search.
* | Add 'and' input function; fixes a bug with t,TGravatar Julian Aron Prenner2014-01-23
| | | | | | | | | | | | 'and' will prevent later input functions from being executed if the previous one did not succeed (e.g. a jump to a char not on the command line)
* | Experimental support for f,F,t,T vi commands.Gravatar Julian Aron Prenner2014-01-22
| | | | | | | | Input functions can now have arguments
| * Correct the correspondence between name_arr and the input codes.Gravatar ridiculousfish2014-01-21
| |
* | Set $fish_bind_mode to default on fish startup; set $fish_key_bindingsGravatar Julian Aron Prenner2014-01-19
| | | | | | | | when sourcing fish_vi_mode.fish
* | Add kill-selection function and visual binds for 'y' and 'd'Gravatar Julian Aron Prenner2014-01-18
| |
* | Add experimental support for selection and visual modeGravatar Julian Aron Prenner2014-01-15
| |
* | Better input handling; add support multiple binding commandsGravatar Julian Aron Prenner2014-01-01
| |
* | Allow restricting earsing and listing of bindings to specific mode;Gravatar Julian Aron Prenner2013-12-31
| | | | | | | | implement force repaint and multi-char bindings;
* | Implement bind modesGravatar Julian Aron Prenner2013-12-31
|/
* add support for downcase-word, upcase-word and capitalise-wordGravatar Christian Rishøj2013-09-09
|
* transpose-wordsGravatar Christian Rishøj2013-06-02
|
* command and binding for transpose-charsGravatar Christian Rishøj2013-05-24
|
* Eliminate a static string from input_terminfo_get_sequenceGravatar ridiculousfish2013-04-15
|
* Use the new input_common_add_callback mechanism to not execute callbacks ↵Gravatar ridiculousfish2013-04-03
| | | | while signals are blocked. Should fix https://github.com/fish-shell/fish-shell/issues/608
* Fix for an exception in a non-interactive shell with empty inputGravatar ridiculousfish2012-12-20
|
* Apply new indentation, brace, and whitespace styleGravatar ridiculousfish2012-11-18
|
* Remove trailing whitespaces and change tabs to spacesGravatar Łukasz Niemier2012-11-18
|
* Added binding for accepting an autosuggestionGravatar ridiculousfish2012-07-15
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/226
* Add command to temporarily suppress the autosuggestion featureGravatar Ian Munsie2012-07-01
| | | | | | | | Autosuggestion will be automatically re-enabled next time a character is inserted. An alternative implementation would require another command to explicitly re-enable it. Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
* Notice when fish_term256 changes and react to itGravatar ridiculousfish2012-03-05
|
* Removed discriminated union from block_t type, allowing us to store ↵Gravatar ridiculousfish2012-02-07
| | | | wcstrings in it
* Migrate input_function_get_names to wcstring_list_tGravatar ridiculousfish2012-01-23
|
* More work to migrate off of ad-hoc data structuresGravatar ridiculousfish2011-12-31
|
* Some changes to migrate towards C++ and a multithreaded modelGravatar ridiculousfish2011-12-26
|
* remove trailing spacesGravatar Grissiom2010-09-18
| | | | | This is done by `sed -i -e 's/[ \t]*$//' *.[c,h]`, which should not introduce any functionality change.
* Add lots of new code comments.Gravatar liljencrantz2008-01-14
| | | | darcs-hash:20080113164747-75c98-9d0cefd27be7aef7ba60772616d9da7e6bb52912.gz
* Remove readline legacy input function 'winch' and replace its functionality ↵Gravatar liljencrantz2007-10-01
| | | | | | with an event handler function. Once again make the null keybinding do nothing. There are various sitauations where you want to perform a repaint at just the right time, and more or less by luck it worked very well to do this on null, but this really shouldn't happen and no longer does. Hopefully if new repainting issues turn up, they can be fixed at the root instead of once again reapplying this broken bandaid. darcs-hash:20070930225354-75c98-8e2b518aa0ef694cee889c1c599ff4f158d9eb7f.gz
* Drop the unneeded input-function delete-line. It was only there for ↵Gravatar liljencrantz2007-09-30
| | | | | | compatiability with readline, which we have dropped. darcs-hash:20070930073018-75c98-d3abd6e63797c4954778486064f5f55a718f066c.gz
* Drop the unneeded input-function exit. It was only there for compatiability ↵Gravatar liljencrantz2007-09-29
| | | | | | with readline, which we have rdropped. darcs-hash:20070929072114-75c98-db188ce2bc31a0668867f9de05ffeed098b988c2.gz
* First stab at dropping all support for readlines inputrc files and instead ↵Gravatar liljencrantz2007-09-26
| | | | | | using an internal system for performing keybinding. darcs-hash:20070925161447-75c98-1feaef88a4b518badb7879f598f06ab650a8f93b.gz
* Make up/down cursor move up or down when in multiline mode, except if ↵Gravatar liljencrantz2007-09-22
| | | | | | already in search mode or at the top/bottom line. Since part of this is done in script-space, this involves adding some functionality to the commandline builtin. darcs-hash:20070921140549-75c98-ba9e83f5e6fdecae5df8f83dd863794c6af9770c.gz
* Make sure cwd colors update when the variable changes. This is a common ↵Gravatar axel2006-12-12
| | | | | | regression, it seems. This time it was caused by the repaint reductions added in 1.22.2. darcs-hash:20061212101348-ac50b-970686fcd3317f19c6131cdc46885a841c68a6d6.gz
* Fix beginning/end-of-line input function, add beginning/end-of-buffer functionsGravatar axel2006-11-01
| | | | darcs-hash:20061031220149-ac50b-6e6b8f523642bead730059dd96ee2d1290283b5e.gz
* Allow Meta-newline to always insert a newline characterGravatar axel2006-10-09
| | | | darcs-hash:20061009011529-ac50b-c8e3d77b569bc445e586c95aca01e4433fbff598.gz
* Detect and handle terminals size changesGravatar axel2006-10-05
| | | | darcs-hash:20061004214502-ac50b-aaf5b76a6281c0ba8757e794b0a802793ce92916.gz
* Some minor steps towards making vi-mode workGravatar axel2006-07-24
| | | | darcs-hash:20060723205203-ac50b-8125e733ed92689ba847ccbb9076d05910e701ac.gz
* Use the intern function to share the strings used to describe various key ↵Gravatar axel2006-06-22
| | | | | | bindings. This saves both performance, code size and memory use, but there is a pathological case where the user continually changes key bindings, resulting in more allocated memory than needed. darcs-hash:20060621140344-ac50b-c7eb89a94a96538215f9a6737f8e4bacd6a801fb.gz
* Fix the longstanding hang-on-exit bug in eterm, as well as making sure the ↵Gravatar axel2006-05-14
| | | | | | history is saved when the terminal emulator exits darcs-hash:20060514101623-ac50b-f8ce693ec111e3c158640ef8de309bf7e5484c5b.gz