|
@@ -62,40 +62,59 @@ namespace Terminal.Gui {
|
|
Curses.move (crow, ccol);
|
|
Curses.move (crow, ccol);
|
|
needMove = false;
|
|
needMove = false;
|
|
}
|
|
}
|
|
- if (runeWidth < 2 && ccol > 0
|
|
|
|
- && Rune.ColumnWidth ((char)contents [crow, ccol - 1, 0]) > 1) {
|
|
|
|
-
|
|
|
|
- var curAtttib = currentAttribute;
|
|
|
|
- Curses.attrset (contents [crow, ccol - 1, 1]);
|
|
|
|
- Curses.mvaddch (crow, ccol - 1, (int)(uint)' ');
|
|
|
|
- contents [crow, ccol - 1, 0] = (int)(uint)' ';
|
|
|
|
- Curses.move (crow, ccol);
|
|
|
|
- Curses.attrset (curAtttib);
|
|
|
|
-
|
|
|
|
- } else if (runeWidth < 2 && ccol <= Clip.Right - 1
|
|
|
|
- && Rune.ColumnWidth ((char)contents [crow, ccol, 0]) > 1) {
|
|
|
|
-
|
|
|
|
- var curAtttib = currentAttribute;
|
|
|
|
- Curses.attrset (contents [crow, ccol + 1, 1]);
|
|
|
|
- Curses.mvaddch (crow, ccol + 1, (int)(uint)' ');
|
|
|
|
- contents [crow, ccol + 1, 0] = (int)(uint)' ';
|
|
|
|
- Curses.move (crow, ccol);
|
|
|
|
- Curses.attrset (curAtttib);
|
|
|
|
|
|
+ if (runeWidth == 0 && ccol > 0) {
|
|
|
|
+ var r = contents [crow, ccol - 1, 0];
|
|
|
|
+ var s = new string (new char [] { (char)r, (char)rune });
|
|
|
|
+ string sn;
|
|
|
|
+ if (!s.IsNormalized ()) {
|
|
|
|
+ sn = s.Normalize ();
|
|
|
|
+ } else {
|
|
|
|
+ sn = s;
|
|
|
|
+ }
|
|
|
|
+ var c = sn [0];
|
|
|
|
+ Curses.mvaddch (crow, ccol - 1, (int)(uint)c);
|
|
|
|
+ contents [crow, ccol - 1, 0] = c;
|
|
|
|
+ contents [crow, ccol - 1, 1] = currentAttribute;
|
|
|
|
+ contents [crow, ccol - 1, 2] = 1;
|
|
|
|
|
|
- }
|
|
|
|
- if (runeWidth > 1 && ccol == Clip.Right - 1) {
|
|
|
|
- Curses.addch ((int)(uint)' ');
|
|
|
|
- contents [crow, ccol, 0] = (int)(uint)' ';
|
|
|
|
} else {
|
|
} else {
|
|
- Curses.addch ((int)(uint)rune);
|
|
|
|
- contents [crow, ccol, 0] = (int)(uint)rune;
|
|
|
|
|
|
+ if (runeWidth < 2 && ccol > 0
|
|
|
|
+ && Rune.ColumnWidth ((char)contents [crow, ccol - 1, 0]) > 1) {
|
|
|
|
+
|
|
|
|
+ var curAtttib = currentAttribute;
|
|
|
|
+ Curses.attrset (contents [crow, ccol - 1, 1]);
|
|
|
|
+ Curses.mvaddch (crow, ccol - 1, (int)(uint)' ');
|
|
|
|
+ contents [crow, ccol - 1, 0] = (int)(uint)' ';
|
|
|
|
+ Curses.move (crow, ccol);
|
|
|
|
+ Curses.attrset (curAtttib);
|
|
|
|
+
|
|
|
|
+ } else if (runeWidth < 2 && ccol <= Clip.Right - 1
|
|
|
|
+ && Rune.ColumnWidth ((char)contents [crow, ccol, 0]) > 1) {
|
|
|
|
+
|
|
|
|
+ var curAtttib = currentAttribute;
|
|
|
|
+ Curses.attrset (contents [crow, ccol + 1, 1]);
|
|
|
|
+ Curses.mvaddch (crow, ccol + 1, (int)(uint)' ');
|
|
|
|
+ contents [crow, ccol + 1, 0] = (int)(uint)' ';
|
|
|
|
+ Curses.move (crow, ccol);
|
|
|
|
+ Curses.attrset (curAtttib);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (runeWidth > 1 && ccol == Clip.Right - 1) {
|
|
|
|
+ Curses.addch ((int)(uint)' ');
|
|
|
|
+ contents [crow, ccol, 0] = (int)(uint)' ';
|
|
|
|
+ } else {
|
|
|
|
+ Curses.addch ((int)(uint)rune);
|
|
|
|
+ contents [crow, ccol, 0] = (int)(uint)rune;
|
|
|
|
+ }
|
|
|
|
+ contents [crow, ccol, 1] = currentAttribute;
|
|
|
|
+ contents [crow, ccol, 2] = 1;
|
|
}
|
|
}
|
|
- contents [crow, ccol, 1] = currentAttribute;
|
|
|
|
- contents [crow, ccol, 2] = 1;
|
|
|
|
} else
|
|
} else
|
|
needMove = true;
|
|
needMove = true;
|
|
|
|
|
|
- ccol++;
|
|
|
|
|
|
+ if (runeWidth < 0 || runeWidth > 0) {
|
|
|
|
+ ccol++;
|
|
|
|
+ }
|
|
if (runeWidth > 1) {
|
|
if (runeWidth > 1) {
|
|
if (validClip && ccol < Clip.Right) {
|
|
if (validClip && ccol < Clip.Right) {
|
|
contents [crow, ccol, 1] = currentAttribute;
|
|
contents [crow, ccol, 1] = currentAttribute;
|