aboutsummaryrefslogtreecommitdiffstats
path: root/google-plus-commando.js
diff options
context:
space:
mode:
authoranekos2011-07-18 14:02:56 +0900
committeranekos2011-07-18 14:02:56 +0900
commitc5f809ba95abfc4a1e15220f036a8bc4cd333762 (patch)
treeafafe0de35b895204c3cd7681506709c7fd143d2 /google-plus-commando.js
parent320a7bb47aceda837aefbc207e2920e3092cb5a2 (diff)
downloadvimperator-plugins-c5f809ba95abfc4a1e15220f036a8bc4cd333762.tar.bz2
viewer の [next][prev] がばぐてた
Diffstat (limited to 'google-plus-commando.js')
-rw-r--r--google-plus-commando.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js
index 59ec7ae..c1de05c 100644
--- a/google-plus-commando.js
+++ b/google-plus-commando.js
@@ -305,9 +305,11 @@ let INFO =
// Commands {{{
const Commands = {
- moveEntry: function (arrow, vim) {
+ moveEntry: function (next) {
+ let [arrow, vim, dir] = next ? ['<Down>', 'j', 'next'] : ['<Up>', 'k', 'prev'];
+
if (Elements.viewer)
- return click(Elements.viewer.next);
+ return click(Elements.viewer[dir]);
let arrowTarget = (function () {
let notifications = Elements.frames.notifications;
@@ -324,8 +326,8 @@ let INFO =
arrowTarget ? [arrow, ['keypress'], arrowTarget] : [vim, ['vkeypress'], Elements.doc]
);
},
- next: withCount(function () Commands.moveEntry('<Down>', 'j')),
- prev: withCount(function () Commands.moveEntry('<Up>', 'k')),
+ next: withCount(function () Commands.moveEntry(true)),
+ prev: withCount(function () Commands.moveEntry(false)),
comment: function() {
let entry = Elements.currentEntry;
click(entry.comment);