summaryrefslogtreecommitdiff
path: root/science/gchemutils/files/patch-libs_gccv_text.cc
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2016-12-28 17:51:10 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2016-12-28 17:51:10 +0000
commit9228437af869f14e9960d09a807d9f84469a66c3 (patch)
treeb6cb70120c8e0c67db3bbb8868e54a1ad0d30ac9 /science/gchemutils/files/patch-libs_gccv_text.cc
parent- Add LICENSE_FILE (diff)
- Add LICENSE
- Switch to USES=localbase - Unbreak on 11+ by backporting upstream revision 2055 Approved by: portmgr blanket
Notes
Notes: svn path=/head/; revision=429805
Diffstat (limited to 'science/gchemutils/files/patch-libs_gccv_text.cc')
-rw-r--r--science/gchemutils/files/patch-libs_gccv_text.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/science/gchemutils/files/patch-libs_gccv_text.cc b/science/gchemutils/files/patch-libs_gccv_text.cc
new file mode 100644
index 000000000000..2f282f640f1f
--- /dev/null
+++ b/science/gchemutils/files/patch-libs_gccv_text.cc
@@ -0,0 +1,26 @@
+--- libs/gccv/text.cc 2016/03/26 17:11:08 2017
++++ libs/gccv/text.cc 2016/10/31 07:44:34 2055
+@@ -1213,7 +1213,10 @@
+ case GDK_KEY_Delete:
+ case GDK_KEY_KP_Delete: {
+ if (m_CurPos != m_StartSel) {
+- ReplaceText (empty_st, MIN (m_CurPos, m_StartSel), abs (m_CurPos - m_StartSel));
++ if (m_CurPos > m_StartSel)
++ ReplaceText (empty_st, m_StartSel, m_CurPos - m_StartSel);
++ else
++ ReplaceText (empty_st, m_CurPos, m_StartSel - m_CurPos);
+ if (client)
+ client->TextChanged (m_CurPos);
+ break;
+@@ -1233,7 +1236,10 @@
+ break;
+ case GDK_KEY_BackSpace: {
+ if (m_CurPos != m_StartSel) {
+- ReplaceText (empty_st, MIN (m_CurPos, m_StartSel), abs (m_CurPos - m_StartSel));
++ if (m_CurPos > m_StartSel)
++ ReplaceText (empty_st, m_StartSel, m_CurPos - m_StartSel);
++ else
++ ReplaceText (empty_st, m_CurPos, m_StartSel - m_CurPos);
+ if (client)
+ client->TextChanged (m_CurPos);
+ break;