Skip to content

Commit

Permalink
Merge pull request #85 from RealHurrison/master
Browse files Browse the repository at this point in the history
fix: move `Gui.cmd.get_command_parts()` outside the loop - thanks @RealHurrison
  • Loading branch information
v1k1ngfr authored Aug 2, 2024
2 parents d9c173f + f94ace6 commit 42bb31a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arsenal/modules/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,12 @@ def get_nb_preview_new_lines(self):
nblines = 0
multiline = '\n' in Gui.cmd.cmdline
firstline = True
parts = Gui.cmd.get_command_parts()
nb_args_todo = len(parts) - 1
# in case of multiline cmd process each line separately
# for each line we have to count each char and deduce the
# number of lines needed to print it
for line in Gui.cmd.cmdline.split('\n'):
parts = Gui.cmd.get_command_parts()
nb_args_todo = len(parts) - 1
nbchar = 0

# for all lines except the first one we have ' >' in addition
Expand Down

0 comments on commit 42bb31a

Please sign in to comment.