mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Merge 806b7cf154 into ef99ffb858
This commit is contained in:
commit
578caf5f4e
|
|
@ -73,6 +73,16 @@ controller.setExCmds({
|
|||
hint: HintingCmds,
|
||||
})
|
||||
|
||||
// limit the command history size
|
||||
setTimeout(async () => {
|
||||
const limit = await config.getAsync('historycmdcountlimit')
|
||||
if (limit < 0) return
|
||||
const cmdHistory = state.cmdHistory
|
||||
if (cmdHistory.length > alert) {
|
||||
state.cmdHistory = cmdHistory.slice(-Math.floor(limit * 2/3))
|
||||
}
|
||||
}, 15 * 1000)
|
||||
|
||||
// {{{ tri.contentLocation
|
||||
let contentLocationCount = 0
|
||||
function updateContentLocation(windowId = browser.windows.WINDOW_ID_CURRENT) {
|
||||
|
|
|
|||
|
|
@ -196,7 +196,8 @@ export function getCommandlineFns(cmdline_state: {
|
|||
if (
|
||||
!command.startsWith(" ") &&
|
||||
!browser.extension.inIncognitoContext &&
|
||||
!(func === "winopen" && args[0] === "-private")
|
||||
!(func === "winopen" && args[0] === "-private") &&
|
||||
!command.startsWith(" ")
|
||||
) {
|
||||
State.getAsync("cmdHistory").then(c => {
|
||||
cmdline_state.state.cmdHistory = c.concat([command])
|
||||
|
|
|
|||
|
|
@ -1304,6 +1304,11 @@ export class default_config {
|
|||
*/
|
||||
searchurlopen: "true" | "false" = "true"
|
||||
|
||||
/**
|
||||
* Reduce the size (line count) of ex command history if the size is larger than the historycmdcountalert when tridactyl started. The size will be reduce to the 2/3 of the limit. Set the limit to -1 to disable history limit.
|
||||
*/
|
||||
historycmdcountlimit = 1536
|
||||
|
||||
/**
|
||||
* When displaying bookmarks in history completions, how many page views to pretend they have.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue