+ Buffer * first = theBufferList().first();
+ if (first) {
+ Buffer * b = first;
+ int ii = 1;
+
+ // We cannot use a for loop as the buffer list cycles.
+ do {
+ docstring label = makeDisplayPath(b->fileName(), 20);
+ if (!b->isClean()) label = label + "*";
+ if (ii < 10)
+ label = convert<docstring>(ii) + ". " + label + '|' + convert<docstring>(ii);
+ tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_BUFFER_SWITCH, b->fileName())));
+
+ b = theBufferList().next(b);
+ ++ii;
+ } while (b != first);
+ } else {