Changeset 15075 for trunk/FACT++


Ignore:
Timestamp:
03/15/13 12:20:54 (12 years ago)
Author:
tbretz
Message:
Do not add something to the history in the StaticPrompt if it is identical to the last history entry.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Readline.cc

    r15064 r15075  
    13111311
    13121312    const string str(buf);
    1313     if (Tools::Trim(str)!=".q")
    1314         if (history_search_pos(str.c_str(), -1, history_length-1)!=history_length-1)
     1313    if (Tools::Trim(str)!=".q" && !Tools::Trim(str).empty())
     1314        if (history_length==0 || history_search_pos(str.c_str(), -1, history_length-1)!=history_length-1)
    13151315            add_history(buf);
    13161316
Note: See TracChangeset for help on using the changeset viewer.