allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [21/25] allura git commit: [#7955] fix for cursor position after removing `` with no selection
Date Fri, 18 Sep 2015 00:53:16 GMT
[#7955] fix for cursor position after removing `` with no selection


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/46dec1af
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/46dec1af
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/46dec1af

Branch: refs/heads/db/7957
Commit: 46dec1aff3ea60e18b19ea468d383b9e1799c286
Parents: 8d91927
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Sep 15 18:36:55 2015 +0000
Committer: Heith Seewald <hseewald@hsmb.local>
Committed: Thu Sep 17 15:22:38 2015 -0400

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/sf_markitup.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/46dec1af/Allura/allura/lib/widgets/resources/js/sf_markitup.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 705112c..3a1be79 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -193,7 +193,9 @@ $(window).load(function() {
                   ch: 99999999999999
                 });
                 cur_start.ch--;
-                cur_end.ch--;
+                if (cur_start !== cur_end) {
+                  cur_end.ch--;
+                }
                 cm.setSelection(cur_start, cur_end);
                 cm.focus();
               } else if (is_code === 'fenced') {


Mime
View raw message