Fixes #1206. NetDriver now print the selected text. Attribute struct now create a valid Value for the current driver. Insert key is detected by NetDriver. (#1207)

This commit is contained in:
BDisp
2021-04-14 16:31:01 +01:00
committed by GitHub
parent 17496ac59e
commit ae2f713e23
3 changed files with 5 additions and 2 deletions

View File

@@ -969,6 +969,9 @@ namespace Terminal.Gui {
case '1':
key = ConsoleKey.F10;
break;
case '2':
key = ConsoleKey.Insert;
break;
case '3':
if (length == 5) {
key = ConsoleKey.F11;

View File

@@ -124,7 +124,7 @@ namespace Terminal.Gui {
/// <param name="background">Background</param>
public Attribute (Color foreground = new Color (), Color background = new Color ())
{
Value = (int)foreground | ((int)background << 4);
Value = Make (foreground, background).Value;
Foreground = foreground;
Background = background;
}

View File

@@ -223,7 +223,7 @@ namespace Terminal.Gui {
var rune = text [idx];
var cols = Rune.ColumnWidth (rune);
if (idx == point && HasFocus && !Used && length == 0 && !ReadOnly) {
Driver.SetAttribute (Colors.Menu.HotFocus);
Driver.SetAttribute (selColor);
} else if (ReadOnly) {
Driver.SetAttribute (idx >= start && length > 0 && idx < start + length ? selColor : roc);
} else if (!HasFocus) {