summaryrefslogtreecommitdiff
path: root/bin/ksh/emacs.c
AgeCommit message (Collapse)Author
2016-08-09In emacs incremental search mode (^R),Ingo Schwarze
make commands starting with the escape key (^[) work as documented. Long-standing bug, this time reported by Dave minus Cohen dot com. OK natano@ halex@
2016-01-26remove a useless macrommcc
ok nicm@
2016-01-08Next step in UTF-8 support:Ingo Schwarze
1. Improve all functions involving words by allowing non-ASCII characters to be part of words. 2. Allow insertion of non-ASCII characters without screwing up the display, by backing up to the start byte after inserting a continuation byte, and starting to re-print there. 3. Fix forward movement which i didn't get quite right in my previous commit: Always advance to a start byte, never to a final continuation byte, or the next insertion would split the character in the middle. OK mpi@
2015-12-30add another combo for home/end keys that works in tmux.Ted Unangst
ok bmercer gsoares nicm sthen
2015-12-14Move system headers from sh.h to those files that actually need them.tb
ok mmcc@ a while ago
2015-12-10In emacs command-line editing mode, make sure that moving left andIngo Schwarze
right can only move by whole characters, not into the middle of a character, and that deleting characters can only delete characters whole, not individual bytes out of characters. Based on parts of a patch by Frederic Nowak <fnwk at mailbox dot org>, tweaked by me. OK tedu@ semarie@ mpi@
2015-10-19Move string.h include from sh.h to the files that use it.mmcc
ok nicm@
2015-10-19Apply style(9) to header includes.mmcc
ok nicm@
2015-10-16Change x_do_ins()'s arg type from int to size_t for correctness's sake,mmcc
and to silence a compiler warning. Also remove its prototype, which is directly above its definition. ok tedu@
2015-10-16Cast iscntrl()'s arg to unsigned char.mmcc
ok nicm@
2015-10-10Replace calls to x_emacs_putbuf() with x_do_ins() since allTodd C. Miller
x_emacs_putbuf() does is call x_do_ins(). From mksh via Michael McConville
2015-10-10Unused macros; from Michael McConville.Nicholas Marriott
2015-10-09remove null check before afree. from Michael McConvilleTed Unangst
2015-09-18Last of the (thing *)0 -> NULL, from Michael McConville. No binaryNicholas Marriott
change.
2015-09-10Replace newline and space defines by "\n" and " " directly, from MichaelNicholas Marriott
McConville. ok millert
2015-09-01remove casts and null checks before free. from Michael McConvilleTed Unangst
ok deraadt
2015-03-25Bind the Delete key (ESC[3~) to delete-char-forwardJeremie Courreges-Anglas
ok mpi@
2015-02-16bcmp to memcmpTed Unangst
2013-12-17ctype cleanups. Repeated re-audits of this sensitive area by okan andTheo de Raadt
myself, with a variety of other people spending some time as well. Thanks.
2013-11-28remove trailing whitespaces; use tabs instead of spaces where appropriate;Igor Sobrado
no binary changes.
2012-06-10Correctly expand bindings containing macros. Fix a regression introducedMartin Pieuchot
in the keybinding system rewrite, reported by Lars Engblom.
2012-04-30generalise ksh keybinding system - bindings are no longer limited inDamien Miller
length and need not start with ESC or ^X; patch from marco@ feedback mpi@
2011-09-05Fix hang in emacs mode. To reproduce the hang go like: "^[16000l" whichMarco Peereboom
would insert 16000 letter l'. Going over the line limit makes no sense so limit it's repetition and prevent the hang in the process. ok guenther
2011-03-14remove unused SILLY game of life.Okan Demirmen
no binary change. sure @deraadt
2009-06-02fix macro handlingAlexander Hall
2007-08-02fix memory leaks and one potential null deref found by coverity. from netbsd.Federico G. Schwindt
millert@ ok
2006-07-10fix ksh prompt wrapping, from Marcus Glocker <marcus@nazgul.ch>.Bob Beck
tested by me and naddy, and others... ok naddy@ and me.
2005-09-26Fix a redraw problem that occurs when a recalled history line hasOtto Moerbeek
length equal to screen width - 2. Spotted by jmc@, tested by various. ok deraadt@
2005-08-01pascoe noted that ^V in ksh emacs mode is not what you expect -- literalTheo de Raadt
next as it is every other canonical mode, or emulation of canonical mode. change it to act like it should ok djm david marc tdeval pvalchev
2005-03-30lots of indentation cleanup, now ksh is readable like our other code.Theo de Raadt
double checked to make sure no binaries change, and eyed by niallo
2005-03-28spacingTheo de Raadt
2005-02-17Printt ^D and newline on EOF in emacs mode like in vi mode.Otto Moerbeek
Help and ok jaredy@ ok millert@
2004-12-23Replace home rolled unsigned char type with u_char.Jonathan Gray
ok millert@
2004-12-22Use stdbool.h instead of rolling our own bools.Todd C. Miller
2004-12-20Ansification plus some minor knf. No binary change on i386 andOtto Moerbeek
sparc64, binary change in lex.o on macppc due to introduction of dopprompt() prototype. ok millert@
2004-12-19spacingTheo de Raadt
2004-12-18deregisterTodd C. Miller
2004-12-18Remove unused OS dependent #ifdef blocks, #defines and macro abstraction.Todd C. Miller
First step in making the ksh code easier to read. From Matthias Kilian
2003-10-22typos from Jared Yanovich;Jason McIntyre
ok deraadt@
2003-09-01In emacs editing mode, ksh by default interprets a set 8th bit asChristian Weisgerber
meta prefix, i.e. all characters with the top bit set (>= 0x80) are taken as commands and cannot be entered literally. Introduce a new shell option, emacs-usemeta, that allows to toggle this behavior. The default is the traditional behavior; to enter 8-bit characters use "set +o emacs-usemeta". ok fgsch@, henning@
2003-08-27rename force_push to something more sensible.Federico G. Schwindt
2003-08-27escape on expand under emacs mode; otto@ ok.Federico G. Schwindt
2003-08-26fix backward and forward delete; from wiz@netbsd.org. many thanks.Federico G. Schwindt
2003-08-23under emacs mode, fix the case when the globbed file and the longestFederico G. Schwindt
prefix lenghts are equal ("a .b" and "a ab" by instance). found and tested by otto@.
2003-08-02don't push things unless force is true; avoid adding text again on yank-pop.Federico G. Schwindt
2003-08-02On ESC-y ESC-y (yank-pop), also check that there is something toFederico G. Schwindt
insert (some text has been killed before). from otto@, fix PR/3384. On yank-pop error (no yank before), reset the index to killstack so another yank-pop does not mangle the prompt if nothing was yanked, and to avoid replacing a text when it shouldn't (yank <something> yank-pop yank-pop). otto@ ok.
2003-06-26protosTheo de Raadt
2003-04-16string cleaning. ok tedu@Thierry Deval
2003-02-28typos; from Brian PooleJason McIntyre
2002-10-16enable meta key in emacs mode for 7-bit locales; provos@Todd C. Miller