Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Fri, 24 Mar 2023 23:47:34 UTC Commit: 01b37454b12749dd68d5a844e961b28a5b5a759a https://github.com/geany/geany-osx/commit/01b37454b12749dd68d5a844e961b28a5b...
Log Message: ----------- Separate git-geany and release-geany block copy scintilla patches so they apply cleanly
Modified Paths: -------------- geany.modules geany_patches/geany_scintilla_block_copy.patch geany_patches/git-geany_scintilla_block_copy.patch
Modified: geany.modules 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -116,7 +116,7 @@ <patch file="https://github.com/geany/geany-osx/raw/master/geany_patches/geany_scintilla_candidate_window_pos.patch" strip="1" /> <patch file="https://github.com/geany/geany-osx/raw/master/geany_patches/git-geany_vte_login_shell.patch" strip="1" /> <patch file="https://github.com/geany/geany-osx/raw/master/geany_patches/geany_workaround_meson_expecting_git_repository.patch" strip="1" /> - <patch file="https://github.com/geany/geany-osx/raw/master/geany_patches/geany_scintilla_block_copy.patch" strip="1" /> + <patch file="https://github.com/geany/geany-osx/raw/master/geany_patches/git-geany_scintilla_block_copy.patch" strip="1" /> </branch> <dependencies> <dep package="geany-deps" />
Modified: geany_patches/geany_scintilla_block_copy.patch 24 lines changed, 15 insertions(+), 9 deletions(-) =================================================================== @@ -1,16 +1,19 @@ -From 31d01326bbe39a8b11d1ab0b0f01fe433288c19c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= techet@gmail.com -Date: Fri, 24 Mar 2023 22:55:17 +0100 -Subject: Scintilla: replace \0 indicating block copy with \1 +From 6dcefb6e50f990de716d327a606ee8edfa5c5fad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jir=CC=8Ci=CC=81=20Techet?= techet@gmail.com +Date: Sat, 25 Mar 2023 00:43:53 +0100 +Subject: [PATCH] Scintilla: replace \0 indicating block copy with \1
This will almost surely include \1 in other applications but at least block copy paste will work within Geany. +--- + scintilla/gtk/ScintillaGTK.cxx | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx -index 7a8c4d0b5..717bb3560 100644 +index 659eb7635..424de552f 100644 --- a/scintilla/gtk/ScintillaGTK.cxx +++ b/scintilla/gtk/ScintillaGTK.cxx -@@ -1520,14 +1520,14 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio +@@ -1399,14 +1399,14 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio return; }
@@ -28,7 +31,7 @@ index 7a8c4d0b5..717bb3560 100644 #endif
#if PLAT_GTK_WIN32 -@@ -1681,8 +1681,14 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se +@@ -1554,8 +1554,14 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se // All other tested applications behave benignly by ignoring the \0. // The #if is here because on Windows cfColumnSelect clip entry is used // instead as standard indicator of rectangularness (so no need to kludge) @@ -38,17 +41,20 @@ index 7a8c4d0b5..717bb3560 100644 + // This will probably lead to pasting \1 in other applications but at least + // makes rectangular copy work in Geany. + const char *textData1 = text->Data(); - gint len = static_cast<gint>(text->Length()); + int len = text->Length(); + char *textData = g_strdup(textData1); + textData[len] = '\1'; #if PLAT_GTK_WIN32 == 0 if (text->rectangular) len++; -@@ -1695,6 +1701,7 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se +@@ -1568,6 +1574,7 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se static_cast<GdkAtom>(GDK_SELECTION_TYPE_STRING), 8, reinterpret_cast<const guchar *>(textData), len); } + g_free(textData); }
void ScintillaGTK::StoreOnClipboard(SelectionText *clipText) { +-- +2.37.5 +
Modified: geany_patches/git-geany_scintilla_block_copy.patch 54 lines changed, 54 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,54 @@ +From 31d01326bbe39a8b11d1ab0b0f01fe433288c19c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= techet@gmail.com +Date: Fri, 24 Mar 2023 22:55:17 +0100 +Subject: Scintilla: replace \0 indicating block copy with \1 + +This will almost surely include \1 in other applications but at least +block copy paste will work within Geany. + +diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx +index 7a8c4d0b5..717bb3560 100644 +--- a/scintilla/gtk/ScintillaGTK.cxx ++++ b/scintilla/gtk/ScintillaGTK.cxx +@@ -1520,14 +1520,14 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio + return; + } + +- // Check for "\n\0" ending to string indicating that selection is rectangular ++ // Check for "\n\1" ending to string indicating that selection is rectangular + bool isRectangular; + #if PLAT_GTK_WIN32 + isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0; + #else +- isRectangular = ((len > 2) && (data[len - 1] == 0 && data[len - 2] == '\n')); ++ isRectangular = ((len > 2) && (data[len - 1] == 1 && data[len - 2] == '\n')); + if (isRectangular) +- len--; // Forget the extra '\0' ++ len--; // Forget the extra '\1' + #endif + + #if PLAT_GTK_WIN32 +@@ -1681,8 +1681,14 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se + // All other tested applications behave benignly by ignoring the \0. + // The #if is here because on Windows cfColumnSelect clip entry is used + // instead as standard indicator of rectangularness (so no need to kludge) +- const char *textData = text->Data(); ++ ++ // Jiri Techet: Even more evil thing: \0 is dropped by macOS so let's use \1. ++ // This will probably lead to pasting \1 in other applications but at least ++ // makes rectangular copy work in Geany. ++ const char *textData1 = text->Data(); + gint len = static_cast<gint>(text->Length()); ++ char *textData = g_strdup(textData1); ++ textData[len] = '\1'; + #if PLAT_GTK_WIN32 == 0 + if (text->rectangular) + len++; +@@ -1695,6 +1701,7 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se + static_cast<GdkAtom>(GDK_SELECTION_TYPE_STRING), + 8, reinterpret_cast<const guchar *>(textData), len); + } ++ g_free(textData); + } + + void ScintillaGTK::StoreOnClipboard(SelectionText *clipText) {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).