From 2b7fc1e7d6314a2b6f9dccda8dfda9ee4bcd57ef Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 18 Jan 2024 11:44:24 +0100 Subject: [PATCH] Slight improvement to paste indentation for Python buffers --- src/source_base.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/source_base.cpp b/src/source_base.cpp index e4a973f..7178c31 100644 --- a/src/source_base.cpp +++ b/src/source_base.cpp @@ -1051,6 +1051,12 @@ void Source::BaseView::paste() { first_paste_line_has_tabs = true; paste_line_tabs = tabs; } + else if(language_id == "python") { + if(!line.empty() && line.back() == ':') { + first_paste_line_has_tabs = true; + paste_line_tabs = tabs; + } + } first_paste_line = false; } else if(!empty_line)