mc/lib
Egmont Koblinger 930f683019 Handle newline and tab with shift/ctrl modifiers correctly.
MC already has its own half-ready trick: when pasting with Shift-Insert,
using the X11 extension, the newline ("Enter" as mc calls it) with the
Shift modifier pressed gets converted to a "Return", and in the editor
the Return character inserts a non-indenting newline. This makes pasting
better in terminals not supporting bracketed paste, however, it has some
problems that this commit addresses:

  * Shift+newline gets this special treatment, but Ctrl+newline gets
    dropped. Hence e.g. when pasting in Gnome-terminal with Ctrl+Shift+V
    all the newlines will be missing. This commit adds the same
    non-indenting newline behavior to Ctrl+Newline and Ctrl+Shift+Newline.

  * The code forgets about Tab that also needs special treatment:

    - Most terminals send \e[Z on Shift+Tab, this is not handled by MC
      at all, moreover it causes a hang for about a second. This commit
      teaches this sequence to MC. This is especially useful when no X11
      is available, because there Ctrl+Tab is identical to Tab, so the
      backwards tab feature is not available. With this commit Shift+Tab
      becomes a backwards tab too on all terminals that emit \e[Z.

    - When pasting to the editor, Shift+Tab, Ctrl+Tab and Ctrl+Shift+Tab
      should all insert a tab for the same reason mentioned at the newline.

    - It would look inconsistent in the keymap files to have logical code
      such as "backtab" instead of "shift-tab" and friends, hence get rid
      of KEY_BTAB and use KEY_M_SHIFT | '\t' instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
..
event PCRE_CFLAGS are CPPFLAGS, actually. 2012-12-18 16:27:49 +04:00
filehighlight Refactoring: use define DEFAULT_CHARSET for "ASCII" charset. 2013-09-21 13:35:59 +04:00
mcconfig (mc_config_new_or_override_file): minor optimization. 2013-03-09 16:04:51 +04:00
search Ticket 3069: fix of case-sensitive search 2013-09-21 13:35:31 +04:00
skin Typo fixes. 2013-07-23 14:15:24 +04:00
strutil Refactoring: use define DEFAULT_CHARSET for "ASCII" charset. 2013-09-21 13:35:59 +04:00
tty Handle newline and tab with shift/ctrl modifiers correctly. 2013-10-03 11:41:58 +04:00
vfs Fix panel recoding 2013-07-23 14:15:24 +04:00
widget Handle newline and tab with shift/ctrl modifiers correctly. 2013-10-03 11:41:58 +04:00
Makefile.am PCRE_CFLAGS are CPPFLAGS, actually. 2012-12-18 16:27:49 +04:00
charsets.c Refactoring: use define DEFAULT_CHARSET for "ASCII" charset. 2013-09-21 13:35:59 +04:00
charsets.h Core, mceditor, mcviewer and mcdiffviewer code tweak and cleanup 2012-06-25 16:58:57 +04:00
event-types.h Optimization of history load. 2011-06-21 16:13:10 +04:00
event.h Event system: added addition parameter event_init_data to mc_event_del() function. 2011-06-21 16:13:10 +04:00
filehighlight.h Rename type file_entry to the file_entry_t. 2013-09-19 16:22:30 +04:00
fileloc.h Ticket #2625: mc does not preserve file mtime when copying over ssh 2011-12-12 11:51:25 +03:00
fs.h Add DIR_IS_DOT and DIR_IS_DOTDOT macros 2013-07-23 14:15:24 +04:00
glibcompat.c Fix: sftp: password ask too often if hostname was bring from ~/.ssh/config file 2013-06-18 12:52:18 +03:00
glibcompat.h Fix: sftp: password ask too often if hostname was bring from ~/.ssh/config file 2013-06-18 12:52:18 +03:00
global.c (mc_global_t::shell): new member to store user's shell 2013-01-16 14:34:11 +04:00
global.h Refactoring: use define DEFAULT_CHARSET for "ASCII" charset. 2013-09-21 13:35:59 +04:00
hook.c Remove irrelevant comments about file_date() function. 2013-01-16 14:34:34 +04:00
hook.h fixed doxygen documentation 2012-09-10 14:29:53 +03:00
keybind.c Ticket #2863 (mcdiff bidirectional merge enhancement) 2012-08-30 10:43:20 +04:00
keybind.h Ticket #2863 (mcdiff bidirectional merge enhancement) 2012-08-30 10:43:20 +04:00
lock.c Fix of DOXYGEN docs: @return instead of @returns 2012-11-09 10:05:13 +04:00
lock.h Changed lock_file() and unlock_file() functions 2012-03-06 11:52:30 +03:00
logging.c Added function mc_config_get_full_path() for search user's config files by short names. 2011-12-06 16:24:10 +03:00
logging.h Added new function mc_always_log() for logging on early bootstrap stages 2011-01-20 17:38:27 +02:00
mcconfig.h Add support of reading parameters for external editor/viewer from main config. 2013-02-16 17:40:37 +03:00
search.h Search: better support of --disable-charset 2013-09-21 13:35:56 +04:00
serialize.c fixed doxygen documentation 2012-09-10 14:29:53 +03:00
serialize.h Added ability to serialize/deserialize strings and config objects(mc_config_t) 2011-06-23 14:45:00 +03:00
skin.h Skin support for window frames. 2012-06-20 22:26:10 +04:00
strescape.h Code indentation in lib directory 2010-11-24 10:27:20 +03:00
strutil.h Typo fixes. 2013-07-23 14:15:24 +04:00
timefmt.c Ticket 1551: Update GPL version from 2 to 3 2011-10-18 14:08:34 +03:00
timefmt.h Moved time related stuff from lib/util.[ch] into lib/timefmt.[ch]. 2010-11-24 10:27:47 +03:00
unixcompat.h Code indentation in lib directory 2010-11-24 10:27:20 +03:00
util.c Misspellings fixes by https://github.com/vlajos/misspell_fixer 2013-06-15 11:10:41 +04:00
util.h Rename type file_entry to the file_entry_t. 2013-09-19 16:22:30 +04:00
utilunix.c Use "'" instead of "`" for messages and comments quoting. 2013-06-03 14:21:03 +03:00
utilunix.h Lib: removed includes to "src" directory 2011-03-21 23:55:52 +02:00
widget.h Rename Dlg_head to WDialog. 2012-11-19 21:42:47 +04:00