psppire-data-window.c (on_cut): Do not append trailing whitespace to clip.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 05:46:14 +0000 (07:46 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 05:46:14 +0000 (07:46 +0200)
src/ui/gui/psppire-data-window.c

index ac5960c9fb96366f747152c4b8807ad0330ff23a..5cb7f1b74500913ab665ebd87c4cda963fbe5176 100644 (file)
@@ -1092,10 +1092,12 @@ on_cut (PsppireDataWindow *dw)
              gchar *s = psppire_data_store_get_string (dw->data_editor->data_store,
                                                          y, var, FALSE);
              g_string_append (str, s);
-             g_string_append (str, "\t");
+              if (x < sel.end_x)
+                g_string_append (str, "\t");
              g_free (s);
            }
-         g_string_append (str, "\n");
+          if (y < sel.end_y)
+            g_string_append (str, "\n");
        }
 
       gtk_clipboard_set_text (clip, str->str, str->len);