pleae apply

thanks
john

-- 
"...life's not a paragraph
and death i think is no
parenthesis"
        - e. e. cummings
Index: src/lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.273
diff -u -r1.273 lyxfunc.C
--- src/lyxfunc.C       2001/12/14 11:55:56     1.273
+++ src/lyxfunc.C       2001/12/15 22:28:06
@@ -739,8 +739,10 @@
 // temporary dispatch method
 void LyXFunc::miniDispatch(string const & s) 
 {
-       if (!s.empty()) {
-               dispatch(s);
+       string s2(frontStrip(strip(s))); 
+ 
+       if (!s2.empty()) {
+               dispatch(s2);
        }
 }
 
@@ -752,7 +754,16 @@
        string line = frontStrip(s);
        string const arg = strip(frontStrip(split(line, cmd, ' ')));
 
-       return dispatch(lyxaction.LookupFunc(cmd), arg);
+       int action = lyxaction.LookupFunc(cmd);
+ 
+       if (action == LFUN_UNKNOWN_ACTION) {
+               string const msg = string(_("Unknown function ("))
+                       + cmd + ")";
+               owner->message(msg);
+               return string();
+       } else {
+               return dispatch(action, arg);
+       } 
 }
 
 
@@ -782,6 +793,7 @@
                        argument = do_not_use_this_arg; // except here
        }
 
+ 
 #ifdef NEW_DISPATCHER
        // We try do call the most specific dispatcher first:
        //  1. the lockinginset's dispatch
@@ -1583,7 +1595,7 @@
 
                        if (!shortcuts.empty()) {
                                comname += ": " + shortcuts;
-                       } else if (!argsadded) {
+                       } else if (!argsadded && !argument.empty()) {
                                comname += " " + argument;
                        }
 
Index: src/minibuffer.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/minibuffer.C,v
retrieving revision 1.44
diff -u -r1.44 minibuffer.C
--- src/minibuffer.C    2001/12/03 13:17:01     1.44
+++ src/minibuffer.C    2001/12/15 22:28:08
@@ -218,7 +218,9 @@
                                // Return the inputted string
                                deactivate();
                                owner_->view()->focus(true);
-                               history_->push_back(input);
+                               if (!input.empty()) {
+                                       history_->push_back(input);
+                               }
                                stringReady.emit(input);
 # if 0
                        }
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.464
diff -u -r1.464 ChangeLog
--- src/ChangeLog       2001/12/15 16:24:40     1.464
+++ src/ChangeLog       2001/12/15 22:28:18
@@ -1,3 +1,10 @@
+2001-12-15  John Levon  <[EMAIL PROTECTED]>
+
+       * lyxfunc.C: ignore space-only minibuffer dispatches.
+         Show the command name when it doesn't exist
+
+       * minibuffer.C: don't add empty lines to the history
+
 2001-12-15  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
        * lyxlength.C (LyXLength): Initialize private variables.

Reply via email to