Commit Graph

474 Commits

Author SHA1 Message Date
christos b354315033 unbreak readline history. 2010-09-16 20:08:51 +00:00
christos 7741aae941 setup a callback to be invoked on resize buffers so that readline can
reset rl_line_buffer which unfortunately some applications use it directly.
2010-08-28 15:44:59 +00:00
christos 6e1c968db3 provide rl_on_newline 2010-08-04 20:29:18 +00:00
christos 0ccb4e68f8 refresh only on SIGCONT not SIGWINCH from Edward Sheldrake 2010-07-21 18:18:52 +00:00
christos c157529beb retry the read after sigwinch too, from Edward Sheldrake 2010-07-19 17:18:13 +00:00
christos cbd798c94b tidy up memory allocation and don't unnecessarily print "./" before names. 2010-06-01 18:20:26 +00:00
christos ca8b6091c1 Use the same hack for Solaris and MacOS/X. This is not right, we only really
support UTF-8, but it will get us going until this is fixed properly.
From Jess Thrysoee
2010-04-20 02:01:13 +00:00
christos 72c00e4a7a \033 is more portable than \e still. 2010-04-18 21:17:47 +00:00
christos df810c5405 ffs needs strings.h 2010-04-18 21:17:22 +00:00
christos d29e250074 shame on solaris that is the last OS not supporting $() 2010-04-18 21:17:05 +00:00
christos 839bac947e From Jess Thrysoee
- Fix wint_t to Int confusion
2010-04-15 00:57:33 +00:00
christos 5443e9b772 From Jess Thrysoee
- use nl_langinfo to test for UTF-8, because some locales are UTF-8 without
     reflecting it in their names.
2010-04-15 00:56:40 +00:00
christos a5b37ffc65 From Jess Thrysoee
expose ct_enc_width()
2010-04-15 00:55:57 +00:00
christos 939651fa2b From Jess Thrysoee
- NARROW_HISTORY and IGNORE_EXTCHARS should not take effect if locale is UTF-8
- account for multi byte char length in
2010-04-15 00:52:48 +00:00
christos b77d4fa5c5 From Jess Thrysoee: call setlocale so we can test UTF-8 2010-04-15 00:50:46 +00:00
christos a9dd944f6b From Jess Thrysoee: add ifndef around def of _GNU_SOURCE 2010-04-15 00:50:03 +00:00
christos f576147073 https://bugzilla.redhat.com/show_bug.cgi?id=575383
Handle EINTR properly.
2010-03-22 22:59:06 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
christos 6fbbcd94ce PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.
2010-01-20 01:15:52 +00:00
christos 654f9c04e7 Fix wrapper for EL_EDITOR, from Michael L. Hitch 2010-01-19 22:38:08 +00:00
christos 081c24c702 PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack
smashing
2010-01-18 19:17:42 +00:00
christos 139d3d5a3b - call the mapping function directly instead of el_wset().
- save the strings passed to the mapping function so that they don't get
  re-used. This leaks. To fix it properly we could either pass a flag to
  free particular entries before re-using, or allocate all of them.
  Allocating all of them wastes memory, allocating some of them makes
  the code more complex.
This fixes compatibility binding (shell tab completion for example)
2010-01-12 19:40:50 +00:00
christos c9043bbf6e - in the argv conversion, handle NULL as NULL
- when printing tab/nl print them, don't handle them specially.
2010-01-12 19:37:18 +00:00
wiz 0d3270a169 Bump date for historyw -> history_w. 2010-01-03 19:05:26 +00:00
christos 73eda9fe27 rename historyw -> history_w for consistency.
add wide tst code and make it the default.
2010-01-03 18:27:10 +00:00
christos 4168f34493 expose the encode and decode string functions for the benefit of history
and readline.
2009-12-31 18:32:37 +00:00
christos dc8498bec8 - Document and enable wide character support.
- Fix read function compatibility.
2009-12-31 15:58:26 +00:00
christos 0b9ae3fdf0 Fix wide build, test it, but don't turn it on yet. 2009-12-30 23:54:52 +00:00
christos 34e53048e6 Wide character support (UTF-8) from Johny Mattsson; currently disabled. 2009-12-30 22:37:40 +00:00
christos 8106943a02 reduce diff with tcsh 2009-12-28 22:15:36 +00:00
christos b90e7198e7 improve on the listing display by printing only one character after the
filename not two, and no trailing blanks. I will revisit this when I write
the ls-F code.
2009-12-28 21:55:38 +00:00
christos c8b67cd8d5 Reduce diff with tcsh's editor. No functional change intended. 2009-12-28 21:54:21 +00:00
christos 969676ec74 Fix bug where tab completion on the second or > line that caused listing
ended up corrupting the display by an extra space in the beginning. Reported
by Mac Chan.
2009-12-28 21:52:43 +00:00
christos ea3813ed2f apply apple patches from:
http://opensource.apple.com/source/libedit/libedit-11/patches/
2009-09-07 21:24:33 +00:00
christos 461d0372fd delete defined(sun), it could be invaded in the user namespace. Suggested
by mrg@
2009-08-31 00:05:43 +00:00
christos 5aa87ec494 use __sun || sun instead of _SunOS, from Jess Thrysoee 2009-08-30 15:41:05 +00:00
christos 085c78fd1f Ignore comment lines in .editrc from Jess Thrysoee 2009-07-25 21:19:23 +00:00
christos bafe66c2cc Only need path if we have issetugid... From Anon Ymous 2009-07-22 18:25:26 +00:00
christos e304eddfd2 Don't depend on side effects inside an assert
From Michael Cook mcook at bbn dot com
2009-07-22 15:58:09 +00:00
christos cfa16c6369 Fix memory leaks in error paths.
From Michael Cook mcook at bbn dot com
2009-07-22 15:57:40 +00:00
christos 83965485c1 Always initialize nread since it is an out param.
From Michael Cook mcook at bbn dot com
2009-07-22 15:57:00 +00:00
christos 17a17e3aeb Move filename to the scope it is being used.
From Michael Cook mcook at bbn dot com
2009-07-22 15:56:29 +00:00
christos cfb4e5f917 Simplify the code. No functional change. 2009-07-17 12:28:27 +00:00
christos e2d0108bb8 - off by one in the term.h case.
- make code more similar to tcsh (if we want to handle wide chars, this is
  needed; for now it is a no-op)
2009-07-17 12:27:57 +00:00
christos 59a88754a7 handle prompt_esc properly. 2009-07-17 12:26:26 +00:00
christos 537657ed45 Use the proper prompt printing function. 2009-07-17 12:25:52 +00:00
christos 8e714f4b6e add stdio.h since we are using FILE. From Grant Erickson 2009-07-09 19:02:04 +00:00
perry eb247ff739 note that the return value of el_gets doesn't remain valid across
calls.
2009-07-05 21:55:24 +00:00
christos 287bd18049 decrement the number of levels after the loop (Julien Torres) 2009-06-09 13:04:33 +00:00
christos e55354196b from Julien Torres, flip the order we pop in the macro array. 2009-06-08 15:10:53 +00:00