]> git.wh0rd.org Git - nano.git/commitdiff
DB's minor efficiency tweak for do_mark()
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 28 Sep 2003 21:26:49 +0000 (21:26 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 28 Sep 2003 21:26:49 +0000 (21:26 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/nano.c

index 9349ee8f922fbe49c44811553efa03ae0157e805..2be078aa25c38f7a7300a61dfef6501bc8dc9726 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -87,6 +87,10 @@ CVS code -
        - Document the support for Esc Esc [character]'s being
          interpreted as Ctrl-[character], and the support for Pico's
          Esc Esc [three-digit decimal ASCII code] input method. (DLR)
+  do_mark()
+       - Toggle MARK_ISSET() at the beginning of the function instead
+         of setting it in one place and unsetting it in another place.
+         (David Benbennick)
   abcd()
        - Removed, as it's unneeded due to the low-level input overhaul.
          (DLR)
index b0665557f84185215067f55ff49f8d3db6fd8034..fc05e424418e17efdb40bfb1871874329ccb186a 100644 (file)
@@ -1289,14 +1289,13 @@ int do_mark(void)
 #ifdef NANO_SMALL
     nano_disabled_msg();
 #else
-    if (!ISSET(MARK_ISSET)) {
+    TOGGLE(MARK_ISSET);
+    if (ISSET(MARK_ISSET)) {
        statusbar(_("Mark Set"));
-       SET(MARK_ISSET);
        mark_beginbuf = current;
        mark_beginx = current_x;
     } else {
        statusbar(_("Mark UNset"));
-       UNSET(MARK_ISSET);
        edit_refresh();
     }
 #endif