mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
hints kitten: Fix a regression that broke recognition of path:linenumber:colnumber
Fixes #4675
This commit is contained in:
@@ -90,6 +90,8 @@ Detailed list of changes
|
|||||||
- Splits layout: A new value for :option:`launch --location` to auto-select the split axis when splitting existing windows.
|
- Splits layout: A new value for :option:`launch --location` to auto-select the split axis when splitting existing windows.
|
||||||
Wide windows are split side-by-side and tall windows are split one-above-the-other
|
Wide windows are split side-by-side and tall windows are split one-above-the-other
|
||||||
|
|
||||||
|
- hints kitten: Fix a regression that broke recognition of path:linenumber:colnumber (:iss:`4675`)
|
||||||
|
|
||||||
- Fix a regression in the previous release that broke :opt:`active_tab_foreground` (:iss:`4620`)
|
- Fix a regression in the previous release that broke :opt:`active_tab_foreground` (:iss:`4620`)
|
||||||
|
|
||||||
- Fix :ac:`show_last_command_output` not working when the output is stored
|
- Fix :ac:`show_last_command_output` not working when the output is stored
|
||||||
|
|||||||
@@ -703,9 +703,18 @@ def main(args: List[str]) -> Optional[Dict[str, Any]]:
|
|||||||
|
|
||||||
|
|
||||||
def linenum_handle_result(args: List[str], data: Dict[str, Any], target_window_id: int, boss: BossType, extra_cli_args: Sequence[str], *a: Any) -> None:
|
def linenum_handle_result(args: List[str], data: Dict[str, Any], target_window_id: int, boss: BossType, extra_cli_args: Sequence[str], *a: Any) -> None:
|
||||||
|
pat = re.compile(r':(\d+)$')
|
||||||
for m, g in zip(data['match'], data['groupdicts']):
|
for m, g in zip(data['match'], data['groupdicts']):
|
||||||
if m:
|
if m:
|
||||||
path, line = g['path'], g['line']
|
path, line = g['path'], g['line']
|
||||||
|
# look for trailers on path of the for :number
|
||||||
|
while True:
|
||||||
|
m = pat.search(path)
|
||||||
|
if m is None:
|
||||||
|
break
|
||||||
|
line = m.group(1)
|
||||||
|
path = path[:-len(m.group())]
|
||||||
|
|
||||||
path = os.path.expanduser(path.split(':')[-1])
|
path = os.path.expanduser(path.split(':')[-1])
|
||||||
line = int(line)
|
line = int(line)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user