aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/input_common.cpp
Commit message (Collapse)AuthorAge
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* enhance the key_reader programGravatar Kurtis Rader2016-05-10
| | | | | | | | | | The original `key_reader` program was useful but didn't do much that `xxd` or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by default. This change adds features that make it superior to those programs for decoding interactive key presses and makes it a first-class citizen like the `fish_indent` program that is always available. Fixes #2991
* restyle input_common module to match project styleGravatar Kurtis Rader2016-05-01
| | | | | | Reduces lint errors from 27 to 24 (-11%). Line count from 466 to 378 (-19%). Another step in resolving issue #2902.
* add better support for IWYU and fix thingsGravatar Kurtis Rader2016-04-26
| | | | | | | | | Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
* fix handling of non-ASCII chars in C localeGravatar Kurtis Rader2016-03-20
| | | | | | | | | | | | The relevant standards allow the mbtowc/mbrtowc functions to reject non-ASCII characters (i.e., chars with the high bit set) when the locale is C or POSIX. The BSD libraries (e.g., on OS X) don't do this but the GNU libraries (e.g., on Linux) do. Like most programs we need the C/POSIX locales to allow arbitrary bytes. So explicitly check if we're in a single-byte locale (which would also include ISO-8859 variants) and simply pass-thru the chars without encoding or decoding. Fixes #2802.
* change default escape timeoutGravatar Kurtis Rader2016-02-04
| | | | | | | | This changes the default escape timeout for the default keybindings (emacs mode) to 300ms and the default for vi keybindings to 10ms. I couldn't resist fixing a few nits in the fish_vi_key_bindings.fish file since I was touching it to set the escape timeout.
* allow configuring the escape delay timeoutGravatar Kurtis Rader2016-01-17
| | | | | | | | Introduce a "fish_escape_delay_ms" variable to allow the user to configure the delay used when seeing a bare escape before assuming no other characters will be received that might match a bound character sequence. This is primarily useful for vi mode so that a bare escape character (i.e., keystroke) can switch to vi "insert" to "normal" mode in a timely fashion.
* improve handling of the escape characterGravatar Kurtis Rader2015-12-22
| | | | | | | | | | | | | | | Increase the delay between seeing an escape character and giving up on whether additional characters that match a key binding are seen. I'm setting the value to 500 ms to match the readline library. We don't need such a large window for sequences transmitted by a terminal (even over ssh where network delays can be a problem). However, we can't expect humans to reliably press the escape key followed by another key with an inter-char delay of less than ~250 ms based on my testing and research. A value of 500 ms provides a nice experience even for people using "fish_vi_mode" bindings as a half second to switch from insert to normal mode is still fast enough that most people won't even notice. Resolves #1356
* Merge branch 'master' into iwyuGravatar David Adam2015-07-26
|
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-24
This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866