Skip to content
Snippets Groups Projects
Commit d1b2b028 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_lightbar_menu_numbered_mode_substr_1_longer' into 'master'

DDLightbarMenu: For numbered mode (no lightbar), allow 1 mor character when using substr with the item text

See merge request !516
parents 33cc9d1c c42f0f9a
No related branches found
No related tags found
1 merge request!516DDLightbarMenu: For numbered mode (no lightbar), allow 1 mor character when using substr with the item text
......@@ -1090,8 +1090,10 @@ function DDLightbarMenu_Draw(pSelectedItemIndexes, pDrawBorders, pDrawScrollbar,
var showMultiSelectMark = (this.multiSelect && (typeof(pSelectedItemIndexes) == "object") && pSelectedItemIndexes.hasOwnProperty(idx));
var itemText = this.GetItemText(i, itemLen, false, showMultiSelectMark);
// TODO: Once, it seemed the text must be shortened by 3 less than the console width or else
// it behaves like there's an extra CRLF, but 2 should be correct.
console.print(substrWithAttrCodes(itemText, 0, console.screen_columns-2) + "\x01n");
// it behaves like there's an extra CRLF. 2 seemed correct, but that can cut off a character
// when not desired.
//console.print(substrWithAttrCodes(itemText, 0, console.screen_columns-2) + "\x01n");
console.print(substrWithAttrCodes(itemText, 0, console.screen_columns-1) + "\x01n");
console.crlf();
}
this.numberedMode = numberedModeBackup;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment