[gjs: 1/5] bug fix: ignore comment and eval commands
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/5] bug fix: ignore comment and eval commands
- Date: Tue, 16 Apr 2019 03:05:31 +0000 (UTC)
commit c5c54c64929eb1f9c89af0ee5996d50e15adeb24
Author: namnumr <nmanumr gmail com>
Date: Mon Apr 15 19:02:55 2019 -0700
bug fix: ignore comment and eval commands
As, we were checking for eval and comment commands only if its string command,
string commands for eval and comment will be still added to group and printed at the end.
I resolved this by checking for comment and eval commands at the start of loop.
modules/_bootstrap/debugger.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/modules/_bootstrap/debugger.js b/modules/_bootstrap/debugger.js
index 93abfab4..f85b9fc1 100644
--- a/modules/_bootstrap/debugger.js
+++ b/modules/_bootstrap/debugger.js
@@ -597,13 +597,14 @@ function helpCommand() {
var group = [];
for (var cmd of commandArray) {
+ // Don't print commands for debugging the debugger
+ if ([commentCommand, evalCommand].includes(cmd) ||
+ ['#', '!'].includes(cmd))
+ continue;
+
if (typeof cmd === 'string') {
group.push(cmd);
} else {
- // Don't print commands for debugging the debugger
- if ([commentCommand, evalCommand].includes(cmd) ||
- ['comment', 'eval'].includes(group[0]))
- continue;
if (group.length)
printcmd(group);
group = [cmd.name.replace(/Command$/, '')];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]