mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Move parallelizable to new file * Add UseSameRuneTypeForWords property * Add SelectWordOnlyOnDoubleClick property and ProcessDoubleClickSelection method * Change IsSameRuneType method to also handle equivalent rune types * Fix WordBackward and WordForward to support properly handle rune types * Fix unit test to deal properly with the new roles of rune types * Add new unit tests * Remove duplicated unit test * Add UseSameRuneTypeForWords and SelectWordOnlyOnDoubleClick handling into Editor scenario
This commit is contained in:
@@ -201,6 +201,8 @@ public class Editor : Scenario
|
||||
CreateAutocomplete (),
|
||||
CreateAllowsTabChecked (),
|
||||
CreateReadOnlyChecked (),
|
||||
CreateUseSameRuneTypeForWords (),
|
||||
CreateSelectWordOnlyOnDoubleClick (),
|
||||
new MenuItem (
|
||||
"Colors",
|
||||
"",
|
||||
@@ -776,6 +778,26 @@ public class Editor : Scenario
|
||||
return new [] { item };
|
||||
}
|
||||
|
||||
private MenuItem CreateSelectWordOnlyOnDoubleClick ()
|
||||
{
|
||||
var item = new MenuItem { Title = "SelectWordOnlyOnDoubleClick" };
|
||||
item.CheckType |= MenuItemCheckStyle.Checked;
|
||||
item.Checked = _textView.SelectWordOnlyOnDoubleClick;
|
||||
item.Action += () => _textView.SelectWordOnlyOnDoubleClick = (bool)(item.Checked = !item.Checked);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private MenuItem CreateUseSameRuneTypeForWords ()
|
||||
{
|
||||
var item = new MenuItem { Title = "UseSameRuneTypeForWords" };
|
||||
item.CheckType |= MenuItemCheckStyle.Checked;
|
||||
item.Checked = _textView.UseSameRuneTypeForWords;
|
||||
item.Action += () => _textView.UseSameRuneTypeForWords = (bool)(item.Checked = !item.Checked);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private MenuItem CreateReadOnlyChecked ()
|
||||
{
|
||||
var item = new MenuItem { Title = "Read Only" };
|
||||
|
||||
Reference in New Issue
Block a user