Fix copying the theme name

Prior to this change both `C` and `c` would copy the path to the theme even
though the help screen claimed that `c` would copy the theme name.

The problem was that the codepoint for `C` is `C` not `c`. The fact that the
shift modifier is coming along is not sufficient to distinguish the two cases.

Tested:
  Before the change: 'c' copies path and 'C' copies path
	After the change: 'c' copies the name and 'C' copies the path
This commit is contained in:
Pepper Lebeck-Jobe
2024-11-08 20:39:45 +01:00
parent 75fe0b2dfb
commit d0dc554bc0

View File

@ -383,7 +383,7 @@ const Preview = struct {
self.themes[self.filtered.items[self.current]].theme, self.themes[self.filtered.items[self.current]].theme,
alloc, alloc,
); );
if (key.matches('c', .{ .shift = true })) if (key.matches('C', .{ .shift = true }))
try self.vx.copyToSystemClipboard( try self.vx.copyToSystemClipboard(
self.tty.anyWriter(), self.tty.anyWriter(),
self.themes[self.filtered.items[self.current]].path, self.themes[self.filtered.items[self.current]].path,