From 0d49775f017aeda0b720b57ddff48a944daf020b Mon Sep 17 00:00:00 2001 From: Jack Cherng Date: Tue, 5 Mar 2024 20:02:15 +0800 Subject: [PATCH] refactor: tidy codes Signed-off-by: Jack Cherng --- plugin/snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/snapshot.py b/plugin/snapshot.py index 47d66883..5a89fb05 100644 --- a/plugin/snapshot.py +++ b/plugin/snapshot.py @@ -116,5 +116,5 @@ def get_view_pseudo_content(view: sublime.View, window: sublime.Window) -> str: def get_view_pseudo_first_line(view: sublime.View, window: sublime.Window) -> str: region = view.line(0) if (max_length := get_merged_plugin_setting("trim_first_line_length", window=window)) >= 0: - region = sublime.Region(region.a, min(region.b, max_length)) + region.b = min(region.b, max_length) return view.substr(region)