mirror of
https://github.com/gdamore/tcell.git
synced 2025-04-29 13:49:10 +08:00
Fix for writing in last column of last line for automargin terminals.
This commit is contained in:
parent
a3de596932
commit
c43eafe245
@ -78,5 +78,6 @@ func init() {
|
|||||||
KeyF36: "\x1b[036q",
|
KeyF36: "\x1b[036q",
|
||||||
KeyClear: "\x1b[144q",
|
KeyClear: "\x1b[144q",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,61 +8,62 @@ func init() {
|
|||||||
|
|
||||||
// alacritty terminal emulator
|
// alacritty terminal emulator
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "alacritty",
|
Name: "alacritty",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 256,
|
Colors: 256,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
||||||
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b(B\x1b[m",
|
AttrOff: "\x1b(B\x1b[m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[<",
|
Mouse: "\x1b[<",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -38,5 +38,6 @@ func init() {
|
|||||||
KeyBackspace: "\b",
|
KeyBackspace: "\b",
|
||||||
KeyHome: "\x1b[H",
|
KeyHome: "\x1b[H",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -51,5 +51,7 @@ func init() {
|
|||||||
KeyF10: "\x1b[20~",
|
KeyF10: "\x1b[20~",
|
||||||
KeyF11: "\x1b[21~",
|
KeyF11: "\x1b[21~",
|
||||||
KeyF12: "\x1b[22~",
|
KeyF12: "\x1b[22~",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -60,5 +60,7 @@ func init() {
|
|||||||
KeyF18: "\x1b[32~",
|
KeyF18: "\x1b[32~",
|
||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -64,5 +64,6 @@ func init() {
|
|||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
KeyHelp: "\x1b[28~",
|
KeyHelp: "\x1b[28~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ func init() {
|
|||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Emacs term.el terminal emulator term-protocol-version 0.96
|
// Emacs term.el terminal emulator term-protocol-version 0.96
|
||||||
@ -57,5 +58,6 @@ func init() {
|
|||||||
KeyEnd: "\x1b[4~",
|
KeyEnd: "\x1b[4~",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ func init() {
|
|||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// GNOME Terminal with xterm 256-colors
|
// GNOME Terminal with xterm 256-colors
|
||||||
@ -124,5 +125,6 @@ func init() {
|
|||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -46,5 +46,6 @@ func init() {
|
|||||||
KeyF7: "\x1bv",
|
KeyF7: "\x1bv",
|
||||||
KeyF8: "\x1bw",
|
KeyF8: "\x1bw",
|
||||||
KeyClear: "\x1bJ",
|
KeyClear: "\x1bJ",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,121 +8,123 @@ func init() {
|
|||||||
|
|
||||||
// KDE console window
|
// KDE console window
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "konsole",
|
Name: "konsole",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 8,
|
Colors: 8,
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b7\x1b[?47h",
|
EnterCA: "\x1b7\x1b[?47h",
|
||||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||||
ShowCursor: "\x1b[?25h",
|
ShowCursor: "\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b[0m\x0f",
|
AttrOff: "\x1b[0m\x0f",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[3%p1%dm",
|
SetFg: "\x1b[3%p1%dm",
|
||||||
SetBg: "\x1b[4%p1%dm",
|
SetBg: "\x1b[4%p1%dm",
|
||||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x0e",
|
EnterAcs: "\x0e",
|
||||||
ExitAcs: "\x0f",
|
ExitAcs: "\x0f",
|
||||||
EnableAcs: "\x1b)0",
|
EnableAcs: "\x1b)0",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[<",
|
Mouse: "\x1b[<",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// KDE console window with xterm 256-colors
|
// KDE console window with xterm 256-colors
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "konsole-256color",
|
Name: "konsole-256color",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 256,
|
Colors: 256,
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b7\x1b[?47h",
|
EnterCA: "\x1b7\x1b[?47h",
|
||||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||||
ShowCursor: "\x1b[?25h",
|
ShowCursor: "\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b[0m\x0f",
|
AttrOff: "\x1b[0m\x0f",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x0e",
|
EnterAcs: "\x0e",
|
||||||
ExitAcs: "\x0f",
|
ExitAcs: "\x0f",
|
||||||
EnableAcs: "\x1b)0",
|
EnableAcs: "\x1b)0",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[<",
|
Mouse: "\x1b[<",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -63,5 +63,6 @@ func init() {
|
|||||||
KeyF18: "\x1b[32~",
|
KeyF18: "\x1b[32~",
|
||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -65,5 +65,7 @@ func init() {
|
|||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -238,6 +238,8 @@ func getinfo(name string) (*terminfo.Terminfo, string, error) {
|
|||||||
t.SetCursor = tc.getstr("cup")
|
t.SetCursor = tc.getstr("cup")
|
||||||
t.CursorBack1 = tc.getstr("cub1")
|
t.CursorBack1 = tc.getstr("cub1")
|
||||||
t.CursorUp1 = tc.getstr("cuu1")
|
t.CursorUp1 = tc.getstr("cuu1")
|
||||||
|
t.InsertChar = tc.getstr("ich1")
|
||||||
|
t.AutoMargin = tc.getflag("am")
|
||||||
t.KeyF1 = tc.getstr("kf1")
|
t.KeyF1 = tc.getstr("kf1")
|
||||||
t.KeyF2 = tc.getstr("kf2")
|
t.KeyF2 = tc.getstr("kf2")
|
||||||
t.KeyF3 = tc.getstr("kf3")
|
t.KeyF3 = tc.getstr("kf3")
|
||||||
@ -605,6 +607,8 @@ func dotGoInfo(w io.Writer, terms []*TData) {
|
|||||||
dotGoAddStr(w, "KeyCtrlEnd", t.KeyCtrlEnd)
|
dotGoAddStr(w, "KeyCtrlEnd", t.KeyCtrlEnd)
|
||||||
dotGoAddInt(w, "Modifiers", t.Modifiers)
|
dotGoAddInt(w, "Modifiers", t.Modifiers)
|
||||||
dotGoAddFlag(w, "TrueColor", t.TrueColor)
|
dotGoAddFlag(w, "TrueColor", t.TrueColor)
|
||||||
|
dotGoAddFlag(w, "AutoMargin", t.AutoMargin)
|
||||||
|
dotGoAddStr(w, "InsertChar", t.InsertChar)
|
||||||
fmt.Fprintln(w, "\t})")
|
fmt.Fprintln(w, "\t})")
|
||||||
}
|
}
|
||||||
fmt.Fprintln(w, "}")
|
fmt.Fprintln(w, "}")
|
||||||
|
@ -36,5 +36,6 @@ func init() {
|
|||||||
KeyLeft: "\x1b[D",
|
KeyLeft: "\x1b[D",
|
||||||
KeyBackspace: "\b",
|
KeyBackspace: "\b",
|
||||||
KeyHome: "\x1b[H",
|
KeyHome: "\x1b[H",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,8 @@ func init() {
|
|||||||
KeyCtrlLeft: "\x1b[Od",
|
KeyCtrlLeft: "\x1b[Od",
|
||||||
KeyCtrlHome: "\x1b[7^",
|
KeyCtrlHome: "\x1b[7^",
|
||||||
KeyCtrlEnd: "\x1b[8^",
|
KeyCtrlEnd: "\x1b[8^",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
|
|
||||||
// rxvt 2.7.9 with xterm 256-colors
|
// rxvt 2.7.9 with xterm 256-colors
|
||||||
@ -210,6 +212,8 @@ func init() {
|
|||||||
KeyCtrlLeft: "\x1b[Od",
|
KeyCtrlLeft: "\x1b[Od",
|
||||||
KeyCtrlHome: "\x1b[7^",
|
KeyCtrlHome: "\x1b[7^",
|
||||||
KeyCtrlEnd: "\x1b[8^",
|
KeyCtrlEnd: "\x1b[8^",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
|
|
||||||
// rxvt 2.7.9 with xterm 88-colors
|
// rxvt 2.7.9 with xterm 88-colors
|
||||||
@ -313,6 +317,8 @@ func init() {
|
|||||||
KeyCtrlLeft: "\x1b[Od",
|
KeyCtrlLeft: "\x1b[Od",
|
||||||
KeyCtrlHome: "\x1b[7^",
|
KeyCtrlHome: "\x1b[7^",
|
||||||
KeyCtrlEnd: "\x1b[8^",
|
KeyCtrlEnd: "\x1b[8^",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
|
|
||||||
// rxvt-unicode terminal (X Window System)
|
// rxvt-unicode terminal (X Window System)
|
||||||
@ -392,6 +398,8 @@ func init() {
|
|||||||
KeyCtrlLeft: "\x1b[Od",
|
KeyCtrlLeft: "\x1b[Od",
|
||||||
KeyCtrlHome: "\x1b[7^",
|
KeyCtrlHome: "\x1b[7^",
|
||||||
KeyCtrlEnd: "\x1b[8^",
|
KeyCtrlEnd: "\x1b[8^",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
|
|
||||||
// rxvt-unicode terminal with 256 colors (X Window System)
|
// rxvt-unicode terminal with 256 colors (X Window System)
|
||||||
@ -471,5 +479,7 @@ func init() {
|
|||||||
KeyCtrlLeft: "\x1b[Od",
|
KeyCtrlLeft: "\x1b[Od",
|
||||||
KeyCtrlHome: "\x1b[7^",
|
KeyCtrlHome: "\x1b[7^",
|
||||||
KeyCtrlEnd: "\x1b[8^",
|
KeyCtrlEnd: "\x1b[8^",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ func init() {
|
|||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// GNU Screen with 256 colors
|
// GNU Screen with 256 colors
|
||||||
@ -122,5 +123,6 @@ func init() {
|
|||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,127 +8,129 @@ func init() {
|
|||||||
|
|
||||||
// simpleterm
|
// simpleterm
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "st",
|
Name: "st",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 8,
|
Colors: 8,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h",
|
EnterCA: "\x1b[?1049h",
|
||||||
ExitCA: "\x1b[?1049l",
|
ExitCA: "\x1b[?1049l",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b[0m",
|
AttrOff: "\x1b[0m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[3%p1%dm",
|
SetFg: "\x1b[3%p1%dm",
|
||||||
SetBg: "\x1b[4%p1%dm",
|
SetBg: "\x1b[4%p1%dm",
|
||||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
EnableAcs: "\x1b)0",
|
EnableAcs: "\x1b)0",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1b[1~",
|
KeyHome: "\x1b[1~",
|
||||||
KeyEnd: "\x1b[4~",
|
KeyEnd: "\x1b[4~",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyClear: "\x1b[3;5~",
|
KeyClear: "\x1b[3;5~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
TrueColor: true,
|
TrueColor: true,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// simpleterm with 256 colors
|
// simpleterm with 256 colors
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "st-256color",
|
Name: "st-256color",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 256,
|
Colors: 256,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h",
|
EnterCA: "\x1b[?1049h",
|
||||||
ExitCA: "\x1b[?1049l",
|
ExitCA: "\x1b[?1049l",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b[0m",
|
AttrOff: "\x1b[0m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
EnableAcs: "\x1b)0",
|
EnableAcs: "\x1b)0",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1b[1~",
|
KeyHome: "\x1b[1~",
|
||||||
KeyEnd: "\x1b[4~",
|
KeyEnd: "\x1b[4~",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyClear: "\x1b[3;5~",
|
KeyClear: "\x1b[3;5~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
TrueColor: true,
|
TrueColor: true,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ func init() {
|
|||||||
KeyF10: "\x1b[233z",
|
KeyF10: "\x1b[233z",
|
||||||
KeyF11: "\x1b[234z",
|
KeyF11: "\x1b[234z",
|
||||||
KeyF12: "\x1b[235z",
|
KeyF12: "\x1b[235z",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
|
|
||||||
// Sun Microsystems Workstation console with color support (IA systems)
|
// Sun Microsystems Workstation console with color support (IA systems)
|
||||||
@ -87,5 +89,7 @@ func init() {
|
|||||||
KeyF10: "\x1b[233z",
|
KeyF10: "\x1b[233z",
|
||||||
KeyF11: "\x1b[234z",
|
KeyF11: "\x1b[234z",
|
||||||
KeyF12: "\x1b[235z",
|
KeyF12: "\x1b[235z",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -61,5 +61,7 @@ func init() {
|
|||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -66,67 +66,6 @@ func init() {
|
|||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
})
|
AutoMargin: true,
|
||||||
|
|
||||||
// tmux with 256 colors
|
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
|
||||||
Name: "tmux-256color",
|
|
||||||
Columns: 80,
|
|
||||||
Lines: 24,
|
|
||||||
Colors: 256,
|
|
||||||
Bell: "\a",
|
|
||||||
Clear: "\x1b[H\x1b[J",
|
|
||||||
EnterCA: "\x1b[?1049h",
|
|
||||||
ExitCA: "\x1b[?1049l",
|
|
||||||
ShowCursor: "\x1b[34h\x1b[?25h",
|
|
||||||
HideCursor: "\x1b[?25l",
|
|
||||||
AttrOff: "\x1b[m\x0f",
|
|
||||||
Underline: "\x1b[4m",
|
|
||||||
Bold: "\x1b[1m",
|
|
||||||
Dim: "\x1b[2m",
|
|
||||||
Italic: "\x1b[3m",
|
|
||||||
Blink: "\x1b[5m",
|
|
||||||
Reverse: "\x1b[7m",
|
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
|
||||||
ResetFgBg: "\x1b[39;49m",
|
|
||||||
PadChar: "\x00",
|
|
||||||
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
|
||||||
EnterAcs: "\x0e",
|
|
||||||
ExitAcs: "\x0f",
|
|
||||||
EnableAcs: "\x1b(B\x1b)0",
|
|
||||||
StrikeThrough: "\x1b[9m",
|
|
||||||
Mouse: "\x1b[M",
|
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
|
||||||
CursorBack1: "\b",
|
|
||||||
CursorUp1: "\x1bM",
|
|
||||||
KeyUp: "\x1bOA",
|
|
||||||
KeyDown: "\x1bOB",
|
|
||||||
KeyRight: "\x1bOC",
|
|
||||||
KeyLeft: "\x1bOD",
|
|
||||||
KeyInsert: "\x1b[2~",
|
|
||||||
KeyDelete: "\x1b[3~",
|
|
||||||
KeyBackspace: "\u007f",
|
|
||||||
KeyHome: "\x1b[1~",
|
|
||||||
KeyEnd: "\x1b[4~",
|
|
||||||
KeyPgUp: "\x1b[5~",
|
|
||||||
KeyPgDn: "\x1b[6~",
|
|
||||||
KeyF1: "\x1bOP",
|
|
||||||
KeyF2: "\x1bOQ",
|
|
||||||
KeyF3: "\x1bOR",
|
|
||||||
KeyF4: "\x1bOS",
|
|
||||||
KeyF5: "\x1b[15~",
|
|
||||||
KeyF6: "\x1b[17~",
|
|
||||||
KeyF7: "\x1b[18~",
|
|
||||||
KeyF8: "\x1b[19~",
|
|
||||||
KeyF9: "\x1b[20~",
|
|
||||||
KeyF10: "\x1b[21~",
|
|
||||||
KeyF11: "\x1b[23~",
|
|
||||||
KeyF12: "\x1b[24~",
|
|
||||||
KeyBacktab: "\x1b[Z",
|
|
||||||
Modifiers: 1,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
// Copyright 2020 The TCell Authors
|
// Copyright 2020 The TCell Authors
|
||||||
|
// Copyright 2020 The TCell Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use file except in compliance with the License.
|
// you may not use file except in compliance with the License.
|
||||||
@ -217,7 +218,9 @@ type Terminfo struct {
|
|||||||
PasteStart string
|
PasteStart string
|
||||||
PasteEnd string
|
PasteEnd string
|
||||||
Modifiers int
|
Modifiers int
|
||||||
TrueColor bool // true if the terminal supports direct color
|
InsertChar string // string to insert a character (ich1)
|
||||||
|
AutoMargin bool // true if writing to last cell in line advances
|
||||||
|
TrueColor bool // true if the terminal supports direct color
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -44,5 +44,6 @@ func init() {
|
|||||||
KeyF8: "\x1bOl",
|
KeyF8: "\x1bOl",
|
||||||
KeyF9: "\x1bOw",
|
KeyF9: "\x1bOw",
|
||||||
KeyF10: "\x1bOx",
|
KeyF10: "\x1bOx",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -43,5 +43,6 @@ func init() {
|
|||||||
KeyF8: "\x1bOl",
|
KeyF8: "\x1bOl",
|
||||||
KeyF9: "\x1bOw",
|
KeyF9: "\x1bOw",
|
||||||
KeyF10: "\x1bOx",
|
KeyF10: "\x1bOx",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -54,5 +54,6 @@ func init() {
|
|||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
KeyHelp: "\x1b[28~",
|
KeyHelp: "\x1b[28~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -59,5 +59,6 @@ func init() {
|
|||||||
KeyF18: "\x1b[32~",
|
KeyF18: "\x1b[32~",
|
||||||
KeyF19: "\x1b[33~",
|
KeyF19: "\x1b[33~",
|
||||||
KeyF20: "\x1b[34~",
|
KeyF20: "\x1b[34~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -42,5 +42,7 @@ func init() {
|
|||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
|
AutoMargin: true,
|
||||||
|
InsertChar: "\x1b[@",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -49,5 +49,6 @@ func init() {
|
|||||||
KeyF8: "\x1b[20~",
|
KeyF8: "\x1b[20~",
|
||||||
KeyF9: "\x1b[21~",
|
KeyF9: "\x1b[21~",
|
||||||
KeyF10: "\x1b[29~",
|
KeyF10: "\x1b[29~",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -55,5 +55,6 @@ func init() {
|
|||||||
KeyPrint: "\x1bP",
|
KeyPrint: "\x1bP",
|
||||||
KeyBacktab: "\x1bI",
|
KeyBacktab: "\x1bI",
|
||||||
KeyShfHome: "\x1b{",
|
KeyShfHome: "\x1b{",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -59,5 +59,6 @@ func init() {
|
|||||||
KeyPrint: "\x1bP",
|
KeyPrint: "\x1bP",
|
||||||
KeyBacktab: "\x1bI",
|
KeyBacktab: "\x1bI",
|
||||||
KeyShfHome: "\x1b{",
|
KeyShfHome: "\x1b{",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ func init() {
|
|||||||
KeyF23: "\x1b[1~",
|
KeyF23: "\x1b[1~",
|
||||||
KeyF24: "\x1b[2~",
|
KeyF24: "\x1b[2~",
|
||||||
KeyBacktab: "\x1b[z",
|
KeyBacktab: "\x1b[z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Wyse WY-99GT in ansi mode (US PC keyboard)
|
// Wyse WY-99GT in ansi mode (US PC keyboard)
|
||||||
@ -110,5 +111,6 @@ func init() {
|
|||||||
KeyF23: "\x1b[1~",
|
KeyF23: "\x1b[1~",
|
||||||
KeyF24: "\x1b[2~",
|
KeyF24: "\x1b[2~",
|
||||||
KeyBacktab: "\x1b[z",
|
KeyBacktab: "\x1b[z",
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -62,5 +62,6 @@ func init() {
|
|||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,182 +8,185 @@ func init() {
|
|||||||
|
|
||||||
// X11 terminal emulator
|
// X11 terminal emulator
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "xterm",
|
Name: "xterm",
|
||||||
Aliases: []string{"xterm-debian"},
|
Aliases: []string{"xterm-debian"},
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 8,
|
Colors: 8,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
||||||
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b(B\x1b[m",
|
AttrOff: "\x1b(B\x1b[m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[3%p1%dm",
|
SetFg: "\x1b[3%p1%dm",
|
||||||
SetBg: "\x1b[4%p1%dm",
|
SetBg: "\x1b[4%p1%dm",
|
||||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// xterm with 88 colors
|
// xterm with 88 colors
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "xterm-88color",
|
Name: "xterm-88color",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 88,
|
Colors: 88,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
||||||
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b(B\x1b[m",
|
AttrOff: "\x1b(B\x1b[m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// xterm with 256 colors
|
// xterm with 256 colors
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "xterm-256color",
|
Name: "xterm-256color",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 256,
|
Colors: 256,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
EnterCA: "\x1b[?1049h\x1b[22;0;0t",
|
||||||
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
ExitCA: "\x1b[?1049l\x1b[23;0;0t",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b(B\x1b[m",
|
AttrOff: "\x1b(B\x1b[m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Blink: "\x1b[5m",
|
Blink: "\x1b[5m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h\x1b=",
|
EnterKeypad: "\x1b[?1h\x1b=",
|
||||||
ExitKeypad: "\x1b[?1l\x1b>",
|
ExitKeypad: "\x1b[?1l\x1b>",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,61 +8,62 @@ func init() {
|
|||||||
|
|
||||||
// KovIdTTY
|
// KovIdTTY
|
||||||
terminfo.AddTerminfo(&terminfo.Terminfo{
|
terminfo.AddTerminfo(&terminfo.Terminfo{
|
||||||
Name: "xterm-kitty",
|
Name: "xterm-kitty",
|
||||||
Columns: 80,
|
Columns: 80,
|
||||||
Lines: 24,
|
Lines: 24,
|
||||||
Colors: 256,
|
Colors: 256,
|
||||||
Bell: "\a",
|
Bell: "\a",
|
||||||
Clear: "\x1b[H\x1b[2J",
|
Clear: "\x1b[H\x1b[2J",
|
||||||
EnterCA: "\x1b[?1049h",
|
EnterCA: "\x1b[?1049h",
|
||||||
ExitCA: "\x1b[?1049l",
|
ExitCA: "\x1b[?1049l",
|
||||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||||
HideCursor: "\x1b[?25l",
|
HideCursor: "\x1b[?25l",
|
||||||
AttrOff: "\x1b(B\x1b[m",
|
AttrOff: "\x1b(B\x1b[m",
|
||||||
Underline: "\x1b[4m",
|
Underline: "\x1b[4m",
|
||||||
Bold: "\x1b[1m",
|
Bold: "\x1b[1m",
|
||||||
Dim: "\x1b[2m",
|
Dim: "\x1b[2m",
|
||||||
Italic: "\x1b[3m",
|
Italic: "\x1b[3m",
|
||||||
Reverse: "\x1b[7m",
|
Reverse: "\x1b[7m",
|
||||||
EnterKeypad: "\x1b[?1h",
|
EnterKeypad: "\x1b[?1h",
|
||||||
ExitKeypad: "\x1b[?1l",
|
ExitKeypad: "\x1b[?1l",
|
||||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||||
ResetFgBg: "\x1b[39;49m",
|
ResetFgBg: "\x1b[39;49m",
|
||||||
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||||
EnterAcs: "\x1b(0",
|
EnterAcs: "\x1b(0",
|
||||||
ExitAcs: "\x1b(B",
|
ExitAcs: "\x1b(B",
|
||||||
StrikeThrough:"\x1b[9m",
|
StrikeThrough: "\x1b[9m",
|
||||||
Mouse: "\x1b[M",
|
Mouse: "\x1b[M",
|
||||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||||
CursorBack1: "\b",
|
CursorBack1: "\b",
|
||||||
CursorUp1: "\x1b[A",
|
CursorUp1: "\x1b[A",
|
||||||
KeyUp: "\x1bOA",
|
KeyUp: "\x1bOA",
|
||||||
KeyDown: "\x1bOB",
|
KeyDown: "\x1bOB",
|
||||||
KeyRight: "\x1bOC",
|
KeyRight: "\x1bOC",
|
||||||
KeyLeft: "\x1bOD",
|
KeyLeft: "\x1bOD",
|
||||||
KeyInsert: "\x1b[2~",
|
KeyInsert: "\x1b[2~",
|
||||||
KeyDelete: "\x1b[3~",
|
KeyDelete: "\x1b[3~",
|
||||||
KeyBackspace: "\u007f",
|
KeyBackspace: "\u007f",
|
||||||
KeyHome: "\x1bOH",
|
KeyHome: "\x1bOH",
|
||||||
KeyEnd: "\x1bOF",
|
KeyEnd: "\x1bOF",
|
||||||
KeyPgUp: "\x1b[5~",
|
KeyPgUp: "\x1b[5~",
|
||||||
KeyPgDn: "\x1b[6~",
|
KeyPgDn: "\x1b[6~",
|
||||||
KeyF1: "\x1bOP",
|
KeyF1: "\x1bOP",
|
||||||
KeyF2: "\x1bOQ",
|
KeyF2: "\x1bOQ",
|
||||||
KeyF3: "\x1bOR",
|
KeyF3: "\x1bOR",
|
||||||
KeyF4: "\x1bOS",
|
KeyF4: "\x1bOS",
|
||||||
KeyF5: "\x1b[15~",
|
KeyF5: "\x1b[15~",
|
||||||
KeyF6: "\x1b[17~",
|
KeyF6: "\x1b[17~",
|
||||||
KeyF7: "\x1b[18~",
|
KeyF7: "\x1b[18~",
|
||||||
KeyF8: "\x1b[19~",
|
KeyF8: "\x1b[19~",
|
||||||
KeyF9: "\x1b[20~",
|
KeyF9: "\x1b[20~",
|
||||||
KeyF10: "\x1b[21~",
|
KeyF10: "\x1b[21~",
|
||||||
KeyF11: "\x1b[23~",
|
KeyF11: "\x1b[23~",
|
||||||
KeyF12: "\x1b[24~",
|
KeyF12: "\x1b[24~",
|
||||||
KeyBacktab: "\x1b[Z",
|
KeyBacktab: "\x1b[Z",
|
||||||
Modifiers: 1,
|
Modifiers: 1,
|
||||||
TrueColor: true,
|
TrueColor: true,
|
||||||
|
AutoMargin: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
19
tscreen.go
19
tscreen.go
@ -628,7 +628,24 @@ func (t *tScreen) drawCell(x, y int) int {
|
|||||||
return width
|
return width
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.cy != y || t.cx != x {
|
if y == t.h-1 && x == t.w-1 && t.ti.AutoMargin && ti.InsertChar != "" {
|
||||||
|
// our solution is somewhat goofy.
|
||||||
|
// we write to the second to the last cell what we want in the last cell, then we
|
||||||
|
// insert a character at that 2nd to last position to shift the last column into
|
||||||
|
// place, then we rewrite that 2nd to last cell. Old terminals suck.
|
||||||
|
t.TPuts(ti.TGoto(x-1, y))
|
||||||
|
defer func() {
|
||||||
|
t.TPuts(ti.TGoto(x-1, y))
|
||||||
|
t.TPuts(ti.InsertChar)
|
||||||
|
t.cy = y
|
||||||
|
t.cx = x-1
|
||||||
|
t.cells.SetDirty(x-1, y, true)
|
||||||
|
_ = t.drawCell(x-1, y)
|
||||||
|
t.TPuts(t.ti.TGoto(0, 0))
|
||||||
|
t.cy = 0
|
||||||
|
t.cx = 0
|
||||||
|
}()
|
||||||
|
} else if t.cy != y || t.cx != x {
|
||||||
t.TPuts(ti.TGoto(x, y))
|
t.TPuts(ti.TGoto(x, y))
|
||||||
t.cx = x
|
t.cx = x
|
||||||
t.cy = y
|
t.cy = y
|
||||||
|
Loading…
x
Reference in New Issue
Block a user