11/10/26 20:33:09.49 s5oHBDi/0.net
>>263 appendHistoryはmainwindowのメソッドじゃないから無理だが、少し工夫すると
履歴を保存しないようにできる。 mainwindow.launcherのonEnter()にデコレータをかまして
ランチャコマンドを実行するたびに履歴をゼロクリアするイメージだ。
config.pyのconfigure()内部に以下を追加するとよい(空白は全角にしている)
def with_clear_history(f):
def ret(*args,**kwds):
result = f(*args,**kwds)
window.commandline_history = []
return result
return ret
window.launcher.onEnter = with_clear_history( window.launcher.onEnter)