aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2023-05-22 21:07:04 +0000
committerterminaldweller <devi@terminaldweller.com>2023-05-22 21:07:04 +0000
commit243a5aae62e4f46dfb145d89d09930f68d69010a (patch)
treeb3d504af3d008dc600e9bc24bab3ff4f834c124e
parentmade it work differently (diff)
downloadirssi-scripts-243a5aae62e4f46dfb145d89d09930f68d69010a.tar.gz
irssi-scripts-243a5aae62e4f46dfb145d89d09930f68d69010a.zip
this change makes it so sb_position's statusbar item updates correctly with vim_mode
-rw-r--r--vim-mode/vim_mode.pl14
1 files changed, 10 insertions, 4 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index c253fdb..b9c929c 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -1858,7 +1858,7 @@ sub cmd_ctrl_d {
if (not defined $count) {
$count = $window->{height} / 2;
}
- $window->view()->scroll($count);
+ $window->command("scrollback goto +$count");
Irssi::statusbar_items_redraw('more');
return (undef, undef);
@@ -1872,7 +1872,7 @@ sub cmd_ctrl_u {
if (not defined $count) {
$count = $window->{height} / 2;
}
- $window->view()->scroll($count * -1);
+ $window->command("scrollback goto -$count");
Irssi::statusbar_items_redraw('more');
return (undef, undef);
@@ -1882,7 +1882,8 @@ sub cmd_ctrl_f {
my ($count, $pos, $repeat) = @_;
my $window = Irssi::active_win();
- $window->view()->scroll($count * $window->{height});
+ my $mycount = $count * $window->{height};
+ $window->command("scrollback goto +$mycount");
Irssi::statusbar_items_redraw('more');
return (undef, undef);
@@ -1891,7 +1892,12 @@ sub cmd_ctrl_f {
sub cmd_ctrl_b {
my ($count, $pos, $repeat) = @_;
- return cmd_ctrl_f($count * -1, $pos, $repeat);
+ my $window = Irssi::active_win();
+ my $mycount = $count * $window->{height};
+ $window->command("scrollback goto -$mycount");
+
+ Irssi::statusbar_items_redraw('more');
+ return (undef, undef);
}
sub cmd_ctrl_wj {