#include "command.h"
#include <wchar.h>
+#include <signal.h>
/*----------------------------------------------------------------------*/
Rs_pointerBlank,
Rs_pointerBlankDelay,
Rs_imLocale,
+ Rs_pastableTabs,
#ifndef NO_SECONDARY_SCREEN
Rs_secondaryScreen,
Rs_secondaryScroll,
# define Opt_insecure 0
# define Opt_borderLess 0
#endif
+#define Opt_pastableTabs (1UL<<25)
/* place holder used for parsing command-line options */
#define Opt_Reverse (1UL<<30)
#define Opt_Boolean (1UL<<31)
-#define DEFAULT_OPTIONS (Opt_scrollBar | Opt_scrollTtyOutput | \
- Opt_jumpScroll | Opt_secondaryScreen)
+#define DEFAULT_OPTIONS (Opt_scrollBar | Opt_scrollTtyOutput \
+ | Opt_jumpScroll | Opt_secondaryScreen \
+ | Opt_pastableTabs)
/* ------------------------------------------------------------------------- */
srp = screen.rend[row]; /* _must_ refresh */
}
- if (screen.flags & Screen_Insert)
- scr_insdel_chars (1, INSERT);
-
// rely on wcwidth to tell us the character width, at least for non-latin1
// do wcwidth before further replacements, as wcwidth says that line-drawing
// characters have width -1 (DOH!) on GNU/Linux sometimes.
int width = c < 0x100 ? 1 : wcwidth (c);
+ if (screen.flags & Screen_Insert)
+ scr_insdel_chars (width, INSERT);
+
if (charsets[screen.charset] == '0') // DEC SPECIAL
{
// vt100 special graphics and line drawing
// store horizontal tab commands as characters inside the text
// buffer so they can be selected and pasted.
- if (ht)
+ if (ht && options & Opt_pastableTabs)
{
base_rend = SET_FONT (base_rend, 0);
// redraw one or more characters
- // seek to the beginning if wide characters
+ // seek to the beginning of wide characters
while (stp[col] == NOCHAR && col > 0)
--col;
BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, "reverse video"),
BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, "login shell"),
BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, "jump scrolling"),
+ BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, "tab characters are pastable"),
#ifdef HAVE_SCROLLBARS
BOOL (Rs_scrollBar, "scrollBar", "sb", Opt_scrollBar, "scrollbar"),
BOOL (Rs_scrollBar_right, "scrollBar_right", "sr", Opt_scrollBar_right, "scrollbar right"),