#289 BufferList doesn't refresh when buffer name changes

normal bug

BufferList doesn't refresh the "Open Files" pane when a buffer is saved with a new name, so is left with a row that can not be selected and a buffer open that does not appear.

jEdit 3.0pre4, BufferList 0.2.1, jdk1.3, win 98


  • John Gellene

    John Gellene - 2000-12-23

    This is because the EditBus messages sent by buffer.saveAs() do not cause BufferList to requery jEdit's list of buffers. A tailored solution would be to create a new kind of BufferUpdate message, "SAVED_AS" and send it after the saveAs operation substantially completes. BufferList could then update its data upon receiving a SAVED_AS without changing the treatment of other messages.

    This would involve three changes, two to the editor core:

    (1) In BufferUpdate add the following field:
    public static final Object SAVED_AS = "SAVED_AS";

    (2) In Buffer.saveAs(), send the message before returning:
    boolean ret = save(view,files[0],rename);
    EditBus.send(new BufferUpdate(this,BufferUpdate.SAVED_AS));
    return ret;

    (3) In BufferList.handleMessage(), begin as follows:

    public void handleMessage(EBMessage message) {
    if (message instanceof BufferUpdate) {
    BufferUpdate bu = (BufferUpdate) message;
    if ((bu.getWhat() == BufferUpdate.CREATED) ||
    bu.getWhat() == BufferUpdate.CLOSED) ||
    bu.getWhat() == BufferUpdate.SAVED_AS)) {
    } else if (bu.getWhat() == BufferUpdate.DIRTY_CHANGED) {

    If this is too much hacking to the editor core, then simply call setNewModels() in response to a DIRTY_CHANGED message.

  • Dirk Möbius

    Dirk Möbius - 2001-01-01
    • status: open --> closed-fixed
  • Dirk Möbius

    Dirk Möbius - 2001-01-01

    fixed in BufferList 0.3


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks