mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-29 22:16:11 +02:00
Removed additional cursor position reports.
This commit is contained in:
parent
5cb239157c
commit
77e4425df6
3 changed files with 19 additions and 34 deletions
|
@ -551,6 +551,7 @@ function displayThemedPrompt(name, client, options, cb) {
|
|||
|
||||
if(options.clearScreen) {
|
||||
client.term.rawWrite(ansi.resetScreen());
|
||||
options.position = {row: 1, column: 1};
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -583,12 +584,11 @@ function displayThemedPrompt(name, client, options, cb) {
|
|||
return callback(null, promptConfig, artInfo);
|
||||
}
|
||||
|
||||
client.once('cursor position report', pos => {
|
||||
artInfo.startRow = pos[0] - artInfo.height;
|
||||
return callback(null, promptConfig, artInfo);
|
||||
});
|
||||
if(options.row != null) {
|
||||
artInfo.startRow = options.row - artInfo.height;
|
||||
}
|
||||
|
||||
client.term.rawWrite(ansi.queryPos());
|
||||
return callback(null, promptConfig, artInfo);
|
||||
},
|
||||
function createMCIViews(promptConfig, artInfo, callback) {
|
||||
const assocViewController = usingTempViewController ? new ViewController( { client : client } ) : options.viewController;
|
||||
|
@ -614,7 +614,9 @@ function displayThemedPrompt(name, client, options, cb) {
|
|||
});
|
||||
},
|
||||
function clearPauseArt(artInfo, assocViewController, callback) {
|
||||
if(options.clearPrompt) {
|
||||
// Only clear with height if clearPrompt is true and if we were able
|
||||
// to determine the row
|
||||
if(options.clearPrompt && artInfo.startRow) {
|
||||
if(artInfo.startRow && artInfo.height) {
|
||||
client.term.rawWrite(ansi.goto(artInfo.startRow, 1));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue