terminal: add semi-colon character to word boundary list for easier selection (#9069)
Sorry, I'm living dangerously here and haven't started a discussion. New ghostty user. When working interactively with SQL clients you're often writing semi-colons at the end of statements, e.g. `select * from table;` It's super annoying when you double-click to select the word `table` it actually selects `table;` Anecdotally, this behaviour disagrees with other terminals I've tried (tho not exhaustive). Disclosure: Claude wrote this code but, ironically, I "assisted it" by pointing to the file and function after uncovering issue #30 and relevant PR.1.2.x
parent
262c8517be
commit
a04730650f
|
|
@ -2559,6 +2559,7 @@ pub fn selectWord(self: *Screen, pin: Pin) ?Selection {
|
||||||
'`',
|
'`',
|
||||||
'|',
|
'|',
|
||||||
':',
|
':',
|
||||||
|
';',
|
||||||
',',
|
',',
|
||||||
'(',
|
'(',
|
||||||
')',
|
')',
|
||||||
|
|
@ -7813,6 +7814,7 @@ test "Screen: selectWord with character boundary" {
|
||||||
" `abc` \n123",
|
" `abc` \n123",
|
||||||
" |abc| \n123",
|
" |abc| \n123",
|
||||||
" :abc: \n123",
|
" :abc: \n123",
|
||||||
|
" ;abc; \n123",
|
||||||
" ,abc, \n123",
|
" ,abc, \n123",
|
||||||
" (abc( \n123",
|
" (abc( \n123",
|
||||||
" )abc) \n123",
|
" )abc) \n123",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue