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
Mitchell Hashimoto 2025-10-10 09:04:22 -07:00
parent 262c8517be
commit a04730650f
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 2 additions and 0 deletions

View File

@ -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",