Skip to content

Commit

Permalink
Merge pull request #10 from ancorgs/clear_ansi
Browse files Browse the repository at this point in the history
Remove ANSI escape codes (bnc#921233)
  • Loading branch information
ancorgs committed Jun 19, 2015
2 parents dcfbd2f + 9ad30fc commit 0d8dbf3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions package/yast2-support.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 19 11:14:48 UTC 2015 - ancor@suse.com

- Do not show ANSI escape codes on screen (bnc#921233)
- 3.1.6

-------------------------------------------------------------------
Thu Dec 4 09:51:40 UTC 2014 - jreidinger@suse.com

Expand Down
5 changes: 3 additions & 2 deletions package/yast2-support.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-support
Version: 3.1.5
Version: 3.1.6
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand All @@ -33,7 +33,8 @@ BuildRequires: rubygem(yast-rake)

BuildArch: noarch

Requires: yast2-ruby-bindings >= 1.0.0
# Yast::CoreExt::AnsiString
Requires: yast2-ruby-bindings >= 3.1.36

Summary: YaST2 - Support Inquiries

Expand Down
12 changes: 10 additions & 2 deletions src/include/support/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
# Authors: Michal Zugec <mzugec@novell.com>
#
# $Id: support.ycp 27914 2006-02-13 14:32:08Z locilka $
#

require "yast/core_ext"

# Main file for support configuration. Uses all other files.
module Yast
module SupportDialogsInclude
using Yast::CoreExt::AnsiString

def initialize_support_dialogs(include_target)
textdomain "support"

Expand Down Expand Up @@ -905,7 +909,11 @@ def GenerateDialog
Builtins.sleep(100)
if SCR.Read(path(".process.running"), pid) == true
new_text = Convert.to_string(SCR.Read(path(".process.read"), pid))
UI.ChangeWidget(Id(:log), :LastLine, new_text) if new_text != nil
if new_text
# Remove ANSI escape codes for cursor movement (bnc#921233)
new_text.remove_ansi_sequences
UI.ChangeWidget(Id(:log), :LastLine, new_text)
end
else
Wizard.EnableNextButton
break
Expand Down

0 comments on commit 0d8dbf3

Please sign in to comment.