rtfm-filemanager 7.0.8 → 7.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +14 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe74615d16c35a3df2cd43dc915eac92084b47c5c459a8d55699bfdea8d8901c
4
- data.tar.gz: 792b91626ef04bd1afa86056b5937502e344864c3cd33a1713fce86206123118
3
+ metadata.gz: 03a8e8292ab2ffb9794497f688bf72000ea65dff64efdb5433847bbadac29b2e
4
+ data.tar.gz: 9c6e85c2a38c06c73568c41617f2137261a65d785139a68578412d6f56fe18af
5
5
  SHA512:
6
- metadata.gz: 904e4487383b214f68096d13d4a207e3e04bcf6f48262dda18fd364a9846a1549a6c834dc206d939dcbffdbcbc1a9bdb52c40027a705e9d8a1a5485653235cfc
7
- data.tar.gz: 5d7599105945ca79638a10b06d9847c1ce0d7b1b977bc2ac26f1bfd4b5c708acb9fac17b82155b4a122a7b559c47809e9d604f51623c74a54f3b480306198990
6
+ metadata.gz: 8c668b4c6ef30a233b217315a6dd47f3af79618a27e92ba1f162d827a83fa198f84c5e021ff8ba7a04af90241549e246e80cfd08fd10bfc0f017093b21db9933
7
+ data.tar.gz: 1e2664f8fc5eb7881b6048dce9f5896bfec8c3f674873640416627a8f1908d7685635971d44d96587afc4710f762248f00a75da37476512cb4b2f51dac803f0e
data/bin/rtfm CHANGED
@@ -18,7 +18,7 @@
18
18
  # get a great understanding of the code itself by simply sending
19
19
  # or pasting this whole file into you favorite AI for coding with
20
20
  # a prompt like this: "Help me understand every part of this code".
21
- @version = '7.0.8' # Fixed ALL SVG metadata processing to prevent hangs
21
+ @version = '7.0.9' # Fixed image preview for filenames with spaces and special characters
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -57,7 +57,7 @@ def check_image_redraw # {{{2
57
57
  img_processes = `pgrep w3mimgdisplay 2>/dev/null`.chomp
58
58
  if img_processes.empty? && File.exist?(@current_image_path)
59
59
  # Redraw the image
60
- showimage(Shellwords.escape(@current_image_path))
60
+ showimage(@current_image_path)
61
61
  end
62
62
  rescue
63
63
  # Silently fail - we don't want focus checking to break anything
@@ -5303,7 +5303,7 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5303
5303
  if file_size > 50_000_000 # 50MB limit for images
5304
5304
  @pR.say("Image too large for preview (#{(file_size / 1024.0 / 1024.0).round(1)}MB > 50MB limit)")
5305
5305
  else
5306
- showimage(Shellwords.escape(@selected))
5306
+ showimage(@selected)
5307
5307
  @image = true
5308
5308
  end
5309
5309
  rescue => e
@@ -5431,8 +5431,12 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5431
5431
  `echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
5432
5432
  @current_image_path = nil # Clear tracking when image is cleared
5433
5433
  else
5434
- # Use the already-escaped image for shell commands
5435
- dimensions = `identify -format "%wx%h" #{image} 2>/dev/null`
5434
+ # Ensure we have the absolute path
5435
+ img_path = File.absolute_path(image)
5436
+
5437
+ # Properly escape image path for shell commands
5438
+ escaped_image = Shellwords.escape(img_path)
5439
+ dimensions = `identify -format "%wx%h" #{escaped_image} 2>/dev/null`
5436
5440
  img_w, img_h = dimensions.split('x').map(&:to_i)
5437
5441
 
5438
5442
  # Fix: Use simultaneous scaling to prevent overflow
@@ -5445,10 +5449,11 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5445
5449
  img_h = (img_h * scale).to_i
5446
5450
  end
5447
5451
 
5448
- # Fix: Unescape the filename for w3mimgdisplay protocol, then quote it
5449
- unescaped = image.gsub(/\\(.)/, '\1') # Remove shell escaping
5450
- `echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{unescaped}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
5451
- @current_image_path = unescaped # Track currently displayed image
5452
+ # Use the absolute path without extra quotes in the w3mimgdisplay protocol
5453
+ `echo '0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;#{img_path}
5454
+ 4;
5455
+ 3;' | #{@imgdisplay} 2>/dev/null`
5456
+ @current_image_path = img_path # Track currently displayed image
5452
5457
  end
5453
5458
  rescue
5454
5459
  @pR.text = 'Error showing image'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtfm-filemanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8
4
+ version: 7.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.4'
55
55
  description: |-
56
- RTFM v7.0.8: Fixed SVG processing hangs, improved undo system with unique trash filenames, and better preview handling.
56
+ RTFM v7.0.9: Fixed image preview for filenames with spaces and special characters.
57
57
  A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. Features include remote SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks, and much more. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers.
58
58
  email: g@isene.com
59
59
  executables: