Buffer Sets

As mentioned in the previous section, each EditPane can show a Buffer Switcher, which displays the contents of a BufferSet. In jEdit 4.2, all EditPane buffer switchers showed the same BufferSet: a global list of all buffers that were opened from any EditPane in any View. When using many Views and EditPanes, this resulted in large lists of buffers, and made the next/previous buffer actions useless with many views, EditPanes and buffers.

In jEdit 4.3, it is possible to have different scopes for the BufferSets of each EditPane. The three scopes are:

  1. Global: Includes all buffers open from any EditPane.

  2. View: EditPanes in the same View share the same BufferSet. Opening a buffer in one View will not affect the non-global scope BufferSets in EditPanes of other Views.

  3. EditPane: Each EditPane can have its own independent BufferSet, although any buffers that are opened from it should also show up in the Global BufferSet..

The default Buffer Set scope for newly created EditPanes is global by default, and can be changed from Utilities>Global Options > View > BufferSet scope for new EditPanes.

New BufferSets are initially empty, or populated with a copy of the existing BufferSet. This behavior can be changed from Global Options > View > New BufferSets contain: copies of current BufferSet.

The statusbar shows you which BufferSet scope is active for the current EditPane (look for the letter "G", "E" or "V"). Double-clicking on that will allow you to change the buffer set. Also, the scope for the current EditPane BufferSet can be changed from View>Buffer Sets > (Global|View|EditPane) Buffer Set.

A new BufferSet can be created in a number of ways, such as when a new View is created (and the default BufferSet scope is not global) or when the View is split (and the default BufferSet scope is EditPane), or when the BufferSet scope is changed to EditPane via the statusbar or menu action.

File > Close behavior has changed in 4.3pre15: now it will remove the current buffer from the EditPane's BufferSet. If it was the last BufferSet to contain that buffer, the buffer is also closed.

The File > Close (global) action closes the buffer in all EditPanes, as the regular File > Close action did before.

Clear BufferSet except active will clear the BufferSet of the current EditPane by performing a Close on all items except those buffers which are displayed in another active EditPane.

The buffer sets feature helps keep the buffer lists local and manageable when using jEdit in a multiple-View and multiple-EditPane environment.