aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/input.cpp
Commit message (Collapse)AuthorAge
* Rewrite error messages for incorrect TERMGravatar David Adam2016-06-26
|
* Style fixes.Gravatar Aaron Gyes2016-06-23
|
* Fix crash with empty $TERMGravatar Aaron Gyes2016-06-21
| | | | | | | | ``` ~ $ set -e TERM; fish Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690. fish: 'fish' terminated by signal SIGABRT (Abort) ```
* put curses/terminfo vars into the environmentGravatar Kurtis Rader2016-06-03
| | | | | | | | | | | | | We need to actually export the curses/terminfo env vars in order for `setupterm()` to be able to use them. While fixing this I reworked the fallback logic implemented by @zanchey in response to issue #1060 in order to simplify the logic and clarify the error messages. This does not allow someone to change the curses/terminfo env vars after the first prompt is displayed (you can but it won't affect the current fish process). It only makes it possible to set `TERM`, `TERMINFO`, and `TERMINFO_DIRS` in *config.fish* or similar config file and have them be honored by fish.
* fix random lint issuesGravatar Kurtis Rader2016-05-29
| | | | | | | | This only eliminates errors reported by `make lint`. It shouldn't cause any functional changes. This change does remove several functions that are unused. It also removes the `desc_arr` variable which is both unused and out of date with reality.
* lint cleanup: eliminate "redundant" errorsGravatar Kurtis Rader2016-05-04
| | | | | This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
* restyle switch blocks to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | | | | | | | I missed restyling a few "switch" blocks to make them consistent with the rest of the code base. This fixes that oversight. This should be the final step in restyling the C++ code to have a consistent style. This also includes a few trivial cleanups elsewhere. I also missed restyling the "complete" module when working my way from a to z so this final change includes restyling that module. Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2 errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842. Resolves #2902.
* restyle input module to match project styleGravatar Kurtis Rader2016-04-30
| | | | | | Reduces lint errors from 69 to 48 (-30%). Line count from 1270 to 1044 (-18%). 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
* implement swap-selection-start-stop functionGravatar Federico Ferri2016-03-20
| | | | | | | | | The swap-selection-start-stop function goes to the other end of the highlighted text, the equivalent of `o' for vim visual mode. Add binding to the swap-selection-start-stop function, `o' when in visual mode. Document swap-selection-start-stop, begin-selection, end-selection, kill-selection.
* Use vector instead of deque in input_function_push_argsGravatar ridiculousfish2016-02-02
| | | | deque is a memory hog last I checked
* Merge branch 'fix-jump' of git://github.com/cpick/fish-shell into cpick-fix-jumpGravatar ridiculousfish2016-02-02
|\
* | allow \cJ (\n) to be bound separate from \cM (\r)Gravatar Kurtis Rader2015-12-08
| | | | | | | | | | | | | | This makes it possible (on UNIX systems, don't know about MS Windows) to bind \cJ (\n) independently of \cM (\r, aka [enter]). Resolves #217
* | Make input_mapping_execute stop returning R_NULL too oftenGravatar ridiculousfish2015-11-07
| | | | | | | | | | | | | | | | | | | | input_mapping_execute, when passed false for allow_commands, will return R_NULL. However currently it does this unconditionally, even if we don't have any commands. This defeats our read-ahead optimization, so we always read and process one byte at a time. This caused pasting to be much slower. Fixes #2215
* | Eliminate global variables associated with builtin IOGravatar ridiculousfish2015-09-22
| | | | | | | | | | | | | | This change eliminates global variables like stdout_buffer. Instead we wrap up the IO information into a new struct io_streams_t, and thread that through every builtin. This makes the intent clearer, gives us a place to hang new IO data, and eliminates the ugly global state management like builtin_push_io.
* | Use the $TERM value from fish's computed environment for ncurses setupGravatar Chris Pick2015-09-09
| | | | | | | | | | | | | | | | | | | | Previously, the process's inherited $TERM value would be used. This prevented users from being able to set $TERM in their config.fish files. To make matters worse, the error message would print the computed $TERM value, giving the mistaken impression that it was being used. Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
| * Fix non-zero arity functions followed by other functionsGravatar Chris Pick2015-09-03
|/ | | | | | | Temporarily skip any queued function code characters when reading the current function's arguments. Fixes #2357.
* Define a constant for function-not-found in input.cppGravatar ridiculousfish2015-08-16
| | | | | Avoids differences in widths of wchar_t, hopefully addressing issue #2284
* Use ++iter, not iter++ in input.cppGravatar ridiculousfish2015-08-10
|
* 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