зеркало из https://github.com/xamarin/XtermSharp.git
Wide char fixes
This commit is contained in:
Родитель
30ba64cc90
Коммит
0966fb87d9
|
@ -964,8 +964,16 @@ namespace XtermSharp {
|
|||
int left = MarginMode ? buffer.MarginLeft : 0;
|
||||
int right = MarginMode ? buffer.MarginRight : buffer.Cols - 1;
|
||||
|
||||
if (buffer.X > left) {
|
||||
buffer.X--;
|
||||
var x = buffer.X;
|
||||
var bufferLine = buffer.Lines[buffer.Y + buffer.YBase];
|
||||
var width = 1;
|
||||
while (x > 0 && bufferLine[x].IsNullChar()) {
|
||||
x--;
|
||||
}
|
||||
|
||||
width = bufferLine[x].Width;
|
||||
if (buffer.X > left) {
|
||||
buffer.X -= width;
|
||||
} else if (ReverseWraparound) {
|
||||
if (buffer.X <= left) {
|
||||
if (buffer.Y > buffer.ScrollTop && buffer.Y <= buffer.ScrollBottom && (buffer.Lines [buffer.Y + buffer.YBase].IsWrapped || MarginMode)) {
|
||||
|
@ -989,11 +997,12 @@ namespace XtermSharp {
|
|||
// This compensates for the scenario where backspace is supposed to move one step
|
||||
// backwards if the "x" position is behind the left margin.
|
||||
// Test BS_MovesLeftWhenLeftOfLeftMargin
|
||||
buffer.X--;
|
||||
} else if (buffer.X > left) {
|
||||
// If we have not reached the limit, we can go back, otherwise stop at the margin
|
||||
// Test BS_StopsAtLeftMargin
|
||||
buffer.X--;
|
||||
buffer.X -= width;
|
||||
}
|
||||
else if (buffer.X > left) {
|
||||
// If we have not reached the limit, we can go back, otherwise stop at the margin
|
||||
// Test BS_StopsAtLeftMargin
|
||||
buffer.X -= width;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче