cetus 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cetus +18 -3
  3. data/cetus.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62bb94776477721739341ff4f03ac93390501da588709f3115a2a4c4ee3ca0f
4
- data.tar.gz: 496df10e6710d503de9d4aa2334ac932286b1cb7c23ccc4ef57af02bb310496d
3
+ metadata.gz: 757ab9f946b5e5cfc747a2d7d7695ff40a345e2542007a1cd2633fc2c4c80dc1
4
+ data.tar.gz: 4339af27945176cae781f07ae7fbf87723f5dbd0433da92706c6f94eaf17c374
5
5
  SHA512:
6
- metadata.gz: a3fc6945a92dde16f2c4dbb6dac0b2e1ffd93968caca6cfaadba473ab183b612d88c6916792fbdeffd1d5c5cbcd561c794c4588f6a76c35a9fe6dc1221a2d747
7
- data.tar.gz: 62f47e97a020a759d14f31c6eb3c6cdefaccea57fb1a14997f535e53b6e6fd914b67b72ce0027cb4d8bf82fb652650654aa09c1742d44a70d60dc92981990b08
6
+ metadata.gz: a1ce4f81647e27cec61915da9a99f85ff949fa6f8590f6baa2a8ab7575e71a24f96b20b1cf2715b0c06f538c3368ac060dc43cee7662afff7dd731d364927e23
7
+ data.tar.gz: fdb76dcbdd1135193c0ccde67bf1a23d40ac0ad94361242badc8bdf82c3f44fd6d81b85c486bffc5973bfe25dd4e16ba43e698b4d9677ee8cd2b1cb1e9d23748
data/bin/cetus CHANGED
@@ -8,7 +8,7 @@
8
8
  # Author: rkumar http://github.com/rkumar/cetus/
9
9
  # Date: 2013-02-17 - 17:48
10
10
  # License: GPL
11
- # Last update: 2019-05-14 10:21
11
+ # Last update: 2019-05-21 11:33
12
12
  # --------------------------------------------------------------------------- #
13
13
  # cetus.rb Copyright (C) 2012-2019 rahul kumar
14
14
  # == CHANGELOG
@@ -41,7 +41,7 @@ now = Time.now.strftime("%Y-%m-%d %H:%M:%S")
41
41
  # alias c=~/bin/cetus.rb
42
42
  # c
43
43
 
44
- VERSION = '0.3.0.0'
44
+ VERSION = '0.3.1.0'
45
45
  CONFIG_PATH = ENV['XDG_CONFIG_HOME'] || File.join(ENV['HOME'], '.config')
46
46
  CONFIG_FILE = "#{CONFIG_PATH}/cetus/conf.yml"
47
47
 
@@ -728,6 +728,13 @@ def place_cursor color=CURSOR_COLOR
728
728
  end
729
729
 
730
730
  c = @cursor - @sta
731
+
732
+ # NOTE: cursor can be higher that viewport !!!
733
+ # we need to move it to next page TODO 2019-05-21 -
734
+ if c > @vps
735
+ c = 0
736
+ end
737
+
731
738
  wid = get_width @vps, @grows
732
739
  if c < @grows
733
740
  rows = c
@@ -1470,6 +1477,14 @@ end
1470
1477
 
1471
1478
  # go to parent dir, and maintain cursor on the dir we came out of
1472
1479
  def goto_parent_dir
1480
+
1481
+ # if in search mode, LEFT should open current dir like escape
1482
+ # Not nice to put this in here !!!
1483
+ if @mode == "SEARCH"
1484
+ escape
1485
+ return
1486
+ end
1487
+
1473
1488
  # When changing to parent, we need to keep cursor on
1474
1489
  # parent dir, not first
1475
1490
  curr = File.basename(Dir.pwd)
@@ -3001,7 +3016,7 @@ def locate
3001
3016
 
3002
3017
  @title = "Files found using: (#{@locate_command} #{pattern})"
3003
3018
  files = `#{@locate_command} #{pattern}`.split("\n")
3004
- files.select! { |x| x = expand_path(x); File.exist?(x) }
3019
+ files.select! { |x| File.exist?(File.expand_path(x)) }
3005
3020
  if files.empty?
3006
3021
  perror 'No files found.'
3007
3022
  return
data/cetus.gemspec CHANGED
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'cetus'
9
- spec.version = '0.3.0'
9
+ spec.version = '0.3.1'
10
10
  spec.authors = ['Rahul Kumar']
11
11
  spec.email = ['oneness.univ@gmail.com']
12
12
  spec.description = %q{lightning fast file navigator}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cetus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahul Kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-14 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler