mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
config: clarify selection-word-boundary docs
This commit is contained in:
@@ -393,7 +393,7 @@ const DerivedConfig = struct {
|
||||
.macos_option_as_alt = config.@"macos-option-as-alt",
|
||||
.selection_clear_on_copy = config.@"selection-clear-on-copy",
|
||||
.selection_clear_on_typing = config.@"selection-clear-on-typing",
|
||||
.selection_word_chars = config.@"selection-word-chars".codepoints,
|
||||
.selection_word_chars = try alloc.dupe(u21, config.@"selection-word-chars".codepoints),
|
||||
.vt_kam_allowed = config.@"vt-kam-allowed",
|
||||
.wait_after_command = config.@"wait-after-command",
|
||||
.window_padding_top = config.@"window-padding-y".top_left,
|
||||
@@ -4264,7 +4264,10 @@ pub fn mouseButtonCallback(
|
||||
if (try self.linkAtPos(pos)) |link| {
|
||||
try self.setSelection(link.selection);
|
||||
} else {
|
||||
const sel = screen.selectWord(pin, self.config.selection_word_chars) orelse break :sel;
|
||||
const sel = screen.selectWord(
|
||||
pin,
|
||||
self.config.selection_word_chars,
|
||||
) orelse break :sel;
|
||||
try self.setSelection(sel);
|
||||
}
|
||||
try self.queueRender();
|
||||
|
||||
@@ -722,7 +722,8 @@ foreground: Color = .{ .r = 0xFF, .g = 0xFF, .b = 0xFF },
|
||||
/// words in code and prose.
|
||||
///
|
||||
/// Each character in this string becomes a word boundary. Multi-byte UTF-8
|
||||
/// characters are supported.
|
||||
/// characters are supported, but only single codepoints can be specified.
|
||||
/// Multi-codepoint sequences (e.g. emoji) are not supported.
|
||||
///
|
||||
/// The null character (U+0000) is always treated as a boundary and does not
|
||||
/// need to be included in this configuration.
|
||||
@@ -733,6 +734,8 @@ foreground: Color = .{ .r = 0xFF, .g = 0xFF, .b = 0xFF },
|
||||
/// For example, to treat semicolons as part of words:
|
||||
///
|
||||
/// selection-word-chars = " \t'\"│`|:,()[]{}<>$"
|
||||
///
|
||||
/// Available since: 1.3.0
|
||||
@"selection-word-chars": SelectionWordChars = .{},
|
||||
|
||||
/// The minimum contrast ratio between the foreground and background colors.
|
||||
|
||||
Reference in New Issue
Block a user