Update MenuFlags to work as expected

* 'popParent' has been removed
* 'noHistory' now works as expected
* Mods that explicitly want noHistory can state such in their constructor()
This commit is contained in:
Bryan Ashby
2023-08-23 18:06:48 -06:00
parent 614fa2d096
commit 1cfbf4fb66
20 changed files with 96 additions and 91 deletions

View File

@@ -2,10 +2,8 @@
'use strict';
// ENiGMA½
const MenuModule = require('./menu_module.js').MenuModule;
const ViewController = require('./view_controller.js').ViewController;
const { MenuModule, MenuFlags } = require('./menu_module.js');
const ansi = require('./ansi_term.js');
const theme = require('./theme.js');
const FileEntry = require('./file_entry.js');
const stringFormat = require('./string_format.js');
const FileArea = require('./file_base_area.js');
@@ -77,6 +75,8 @@ exports.getModule = class FileAreaList extends MenuModule {
this.fileList = _.get(options, 'extraArgs.fileList');
this.lastFileNextExit = _.get(options, 'extraArgs.lastFileNextExit', true);
this.setMergedFlag(MenuFlags.NoHistory);
if (this.fileList) {
// we'll need to adjust position as well!
this.fileListPosition = 0;