refactor: fix trailing whitespace

This commit is contained in:
phil294 committed 2023-07-06 23:56:44 +02:00
1 parent 7b2926a18b
commit b5409e21e5
11 files changed
+16 -15

No files matched your search

+2 -1
View File
@@ -22,5 +22,6 @@
"ungrab",
"XFCE",
"xtst"
]
],
"files.trimTrailingWhitespace": true
}
+3 -3
View File
@@ -26,10 +26,10 @@ module Build
@resolved = false
abstract def initialize(conditional_cmd : Cmd::Base)
# bottommost section, regardless if open or not
private abstract def active_section : ConditionalSection
def start_block
raise "" if active_section.block_started || active_section.first_child
active_section.block_started = true
@@ -99,7 +99,7 @@ module Build
raise "" if @else_section || active_section.open?
@else_section = ConditionalSection.new Else.new(0, [] of String)
end
private def link_all(next_cmd_outside : Cmd::Base? = nil)
@if_section.cmd.je = @if_section.first_child || next_cmd_outside
@if_section.last_child.try &.next = next_cmd_outside
+2 -2
View File
@@ -21,7 +21,7 @@ module Cmd
def initialize(@line_no, @args)
end
# *args* is like `@args`, but parsed (vars substituted).
# runner can be accessed via `thread.runner`.
# When `class.conditional`, the return value determines the next branch.
@@ -33,7 +33,7 @@ module Cmd
property next : Base?
property je : Base?
property jne : Base?
def self.all_subclasses
{{ @type.all_subclasses }}
end
+1 -1
View File
@@ -1,4 +1,4 @@
# If var in value1,value2,...
# If var in value1,value2,...
class Cmd::ControlFlow::IfIn < Cmd::Base
def self.min_args; 2 end
def self.max_args; 2 end
+1 -1
View File
@@ -1,4 +1,4 @@
# If var not in value1,value2,...
# If var not in value1,value2,...
class Cmd::ControlFlow::IfNotIn < Cmd::Base
def self.min_args; 2 end
def self.max_args; 2 end
+1 -1
View File
@@ -5,7 +5,7 @@ class Cmd::Gtk::Gui::GuiSubmit < Cmd::Base
def run(thread, args)
gui_id = args[0]
no_hide = args[1]? && args[1].downcase == "nohide"
thread.runner.display.gtk.gui(thread, gui_id) do |gui|
gui.var_control_info.each do |var_name, info|
ctrl = info.control
+2 -2
View File
@@ -27,7 +27,7 @@ class Cmd::Misc::Run < Cmd::Base
cmd = "setsid"
params = args
end
env = {
# AppImage/linuxdeploy-plugin-gtk sets several env vars *for the main binary itself*
# but we need to prevent those overrides from being inherited by spawned sub processes
@@ -101,7 +101,7 @@ class Cmd::Misc::Run < Cmd::Base
rescue
end
end
if ! success && open
success, stdout, stderr = try_execute(thread, target_raw, chdir: pwd, stdout: !!output_stdout, stderr: !!output_stderr)
end
+1 -1
View File
@@ -42,7 +42,7 @@ class Cmd::X11::Window::Util
wins.select! do |win|
if ! exclude_title.empty?
return false if win.name.not_nil!.includes? exclude_title
return false if win.name.not_nil!.includes? exclude_title
end
if ! text.empty? || ! exclude_text.empty?
win_texts = thread.runner.display.at_spi &.get_all_texts(thread, win, include_hidden: false)
+1 -1
View File
@@ -88,7 +88,7 @@ Install:
RunWait, desktop-file-install --dir=%A_Home%/.local/share/applications %app_name%-windowspy.desktop
FileDelete, %app_name%-windowspy.desktop
RunWait, update-desktop-database %A_Home%/.local/share/applications
RunWait, update-desktop-database %A_Home%/.local/share/applications
MsgBox, Installation complete.
Return
+1 -1
View File
@@ -136,7 +136,7 @@ module Run
end
end
STDERR.puts "AtSpi failed five times in a row. Last seen error:"
error.not_nil!.inspect_with_backtrace(STDERR)
error.not_nil!.inspect_with_backtrace(STDERR)
return nil
end
end
+1 -1
View File
@@ -198,7 +198,7 @@ module Run
match_path = top_match_path + match_path
end
match_class_NN = to_class_NN(match_path, match.role_name)
thread.cache.accessible_by_class_nn_by_window_id[win.window][match_class_NN] = match
{% if ! flag?(:release) %}
puts "[debug] find_descendant name:#{match.name}, role:#{match.role}, classNN:#{match_class_NN}, text:#{match ? get_text(match) : ""}, actions:#{get_actions(match)[1]}, selectable:#{selectable?(match)}. top_match_path:#{top_match_path}, match_path:#{match_path}, top_match role:#{top_match.role}, top_match name:#{top_match.name}"