aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/syntax/syntaxedit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* syntax: port to goSimon Rozman2020-11-131-415/+0
| | | | | | | | | Arm has no CGo support, so port the syntax editor C code to Go and hope that it's fast enough. This is a pretty literal/unsafe translation from the C. Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: skip highlights if too many spansJason A. Donenfeld2020-06-091-5/+9
| | | | | | | | The rich text control is slow, so keep in plain text if there's too many. Suggested-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: disable events when highlightingJason A. Donenfeld2019-12-111-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: allow (Shift+)Tab to move focus to sibling controls in RichEditSimon Rozman2019-10-261-0/+8
| | | | | | | | | | | With RTF control consuming Tab and Enter keystrokes, there was no way to create or edit a tunnel using keyboard only. This was a major concern for accessibility. Should user want to explicitly insert \t into configuration, one can use Ctrl+Tab, paste it, or use Alt+09 (on numeric keyboard). Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: fix popup menu placement in syntaxeditSimon Rozman2019-09-131-3/+4
| | | | | | | When pop-up menu is invoked using keyboard, the coordinates are (-1,-1). However, LOWORD/HIWORD return (65535, 65535). Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: syntax: support Shift+Ins pasting tooSimon Rozman2019-09-051-5/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: syntax: xor colors with backgroundSimon Rozman2019-09-051-1/+8
| | | | | | | | | | This makes syntax highlighting retain text contrast on black background (e.g. high-contrast mode) Maybe using a smarter arithmetic than XOR could be used to retain errors in red. They turn cyan on black background now. Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: react to DPI changes in syntax editorJason A. Donenfeld2019-05-161-4/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: syntax: rehighlight on DPI changeJason A. Donenfeld2019-05-131-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: syntax: fix indentationJason A. Donenfeld2019-05-131-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: syntax: implement trafic blocking semanticsJason A. Donenfeld2019-05-051-0/+64
| | | | | | This is our "auto kill switch". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: syntax: guard calls to highlightJason A. Donenfeld2019-04-151-13/+17
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: lazily load ui libraryJason A. Donenfeld2019-03-071-2/+4
| | | | | | | This way we don't have msftedit.dll loaded into the address space of the process doing real crypto. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: safe dll loadingJason A. Donenfeld2019-03-061-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: flat borderJason A. Donenfeld2019-03-021-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: move syntaxedit to sub-packageJason A. Donenfeld2019-02-281-0/+311
This speeds up compilation time considerably by not needing to invoke cgo for changes in the main UI. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>