Skip to content
  • Tim Allen's avatar
    Remove state-save-reg-sync. · ab7c0c76
    Tim Allen authored
    Certain Kakoune registers (the ones that represent prompt history,
    like the command prompt or the pipe prompt) append new items rather than
    replacing the whole list. When I originally created kakoune-state-save,
    I depended on that behaviour to automatically merge history
    from different Kakoune sessions: when a Kakoune session ended,
    it would merge in history saved by other sessions before writing out its own
    history.
    
    Unfortunately, Kakoune limits the number of history items to 100,
    which means that if you have 100 items on disk, state-save-reg-load will
    clobber the history of your current session with that of the previous session,
    so no new history items will ever be written out ever again.
    
    Since loading a register immediately before saving it out breaks things,
    and that's exactly what state-save-reg-sync did,
    there's no point in having it around.
    
    I've filed a Kakoune issue about making register-value merging smarter
    (https://github.com/mawww/kakoune/issues/3354), if it gets fixed then I'll
    add state-save-reg-sync back.
    ab7c0c76