mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-12 19:49:32 +02:00
fix: when parsing python_strings options, don't fail if ' is last
Previously, if the last character was `'` parsing would fail: from `abc'` it would produce the literal `'''abc''''`, which has one too many unescaped single quote at the end. This also fixes the issue for solo `'''`, where before it would produce `''''\\'''''`, again with one too many single quote at the end. I added tests for both cases.
This commit is contained in:
@@ -234,6 +234,10 @@ def conf_parsing(self):
|
||||
self.ae(opts.mouse_hide_wait[3], True)
|
||||
self.ae(opts.color23, Color(255, 0, 0))
|
||||
self.assertFalse(opts.keyboard_modes[''].keymap)
|
||||
opts = p("url_excluded_characters '''")
|
||||
self.ae(opts.url_excluded_characters, "'''")
|
||||
opts = p("url_excluded_characters abc'")
|
||||
self.ae(opts.url_excluded_characters, "abc'")
|
||||
opts = p('clear_all_shortcuts y', 'map f1 next_window')
|
||||
self.ae(len(opts.keyboard_modes[''].keymap), 1)
|
||||
opts = p('clear_all_mouse_actions y', 'mouse_map left click ungrabbed mouse_click_url_or_select')
|
||||
|
||||
Reference in New Issue
Block a user