We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 197ebfa + db45113 commit 8c5107fCopy full SHA for 8c5107f
1 file changed
lib/stringformat.rb
@@ -53,13 +53,12 @@ def iterm2?
53
system("convert -density 130 #{pdf_file} #{png_file} >/dev/null 2>&1")
54
if File.exist?(png_file)
55
width = (cols * 0.75).to_i
56
- viu_output = `viu -w #{width} #{png_file} 2>/dev/null`
57
- if $?.success? && !viu_output.empty?
+ if system("viu -w #{width} #{png_file} >/dev/null 2>&1")
58
# Clean up
59
tmp_file.unlink
60
File.unlink(pdf_file)
61
File.unlink(png_file)
62
- viu_output
+ "" # Image displayed, return empty string
63
else
64
# Fallback if viu fails
65
0 commit comments