[gnome-calculator/gnome-3-10] gnome-calculator : Replaces '\n' chars by ' ' chars while pasting text in gnome-calculator.
- From: Arth Patel <arthpatel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/gnome-3-10] gnome-calculator : Replaces '\n' chars by ' ' chars while pasting text in gnome-calculator.
- Date: Sat, 9 Nov 2013 21:38:22 +0000 (UTC)
commit 03d0bafdac39e6b3d7cacf778fbe1ae02c495725
Author: Kevin THIERRY <kevin thierry kaiwen me>
Date: Mon Oct 28 14:58:03 2013 +0100
gnome-calculator : Replaces '\n' chars by ' ' chars while pasting text in gnome-calculator.
RETURN chars cannot be entered using the keyboard but can be entered using
the copy/paste function. This patch prevents that from happening.
https://bugzilla.gnome.org/show_bug.cgi?id=707061
src/math-equation.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/math-equation.vala b/src/math-equation.vala
index b97eae6..11f4ceb 100644
--- a/src/math-equation.vala
+++ b/src/math-equation.vala
@@ -470,7 +470,8 @@ public class MathEquation : Gtk.TextBuffer
private void on_paste (Gtk.Clipboard clipboard, string? text)
{
if (text != null)
- insert (text);
+ /* Replaces '\n' characters by ' ' in text before pasting it. */
+ insert (text.delimit ("\n", ' '));
}
public void undo ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]