[scintilla:feature-requests] #1554 [patch] SciTE: Skip context when going to diff message in output pane

0 views
Skip to first unread message

Jakub Vrána

unread,
Apr 15, 2025, 1:07:23 PMApr 15
to scintill...@googlegroups.com

[feature-requests:#1554] [patch] SciTE: Skip context when going to diff message in output pane

Status: open
Group: Initial
Created: Tue Apr 15, 2025 05:07 PM UTC by Jakub Vrána
Last Updated: Tue Apr 15, 2025 05:07 PM UTC
Owner: nobody

This is about diff messages in the output pane:

--- a/src/SciTEBuffers.cxx  Sun Apr 13 10:36:27 2025 +0200
+++ b/src/SciTEBuffers.cxx  Tue Apr 15 18:44:41 2025 +0200
@@ -2133,7 +2133,11 @@
               if (linePlace != std::string::npos)
                 atPos = linePlace + 2; // skip "@@ -1,1" and then " +"
             }
-            sourceLine = IntegerFromText(atMessage.c_str() + atPos) - 1;
+            SA::Line contextLine = atLine + 1;
+            while (GetLine(wOutput, contextLine)[0] == ' ') {
+              contextLine++;
+            }
+            sourceLine = IntegerFromText(atMessage.c_str() + atPos) + contextLine - atLine - 2;
           }
         }

When I double-click on the line with --- or +++ then SciTE jumps to the line specified at the @@ line. If I remember correctly then it was me who implemented this feature.

This patch skips the context - lines starting with space. The outcome is jumping right at the modified line and not usually 3 lines before.


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/feature-requests/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Jakub Vrána

unread,
Apr 15, 2025, 1:11:53 PMApr 15
to scintill...@googlegroups.com

Here's the patch.

Attachments:

Neil Hodgson

unread,
Apr 16, 2025, 6:12:01 PMApr 16
to scintill...@googlegroups.com
  • labels: --> SciTE
  • Group: Initial --> Committed
  • Comment:

Committed as [db1a99].


[feature-requests:#1554] [patch] SciTE: Skip context when going to diff message in output pane

Status: open
Group: Committed
Labels: SciTE

Created: Tue Apr 15, 2025 05:07 PM UTC by Jakub Vrána

Last Updated: Tue Apr 15, 2025 05:11 PM UTC
Owner: nobody

Neil Hodgson

unread,
Jun 8, 2025, 1:26:15 AMJun 8
to scintill...@googlegroups.com
  • status: open --> closed

[feature-requests:#1554] [patch] SciTE: Skip context when going to diff message in output pane

Status: closed
Group: Committed
Labels: SciTE

Created: Tue Apr 15, 2025 05:07 PM UTC by Jakub Vrána

Last Updated: Wed Apr 16, 2025 10:11 PM UTC
Owner: nobody

Reply all
Reply to author
Forward
0 new messages