From 4b1906b882f3dcefd8074e235fb856e371b5e4d8 Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Sun, 28 Jun 2009 22:24:38 +0200
Subject: [PATCH] Fix off by one error in history indexes.
---
lib/plugins/movelist/simple_movelist.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/plugins/movelist/simple_movelist.rb b/lib/plugins/movelist/simple_movelist.rb
index b32a95f..d927765 100644
--- a/lib/plugins/movelist/simple_movelist.rb
+++ b/lib/plugins/movelist/simple_movelist.rb
@@ -1,4 +1,5 @@
require 'plugins/plugin'
+require 'observer_utils'
class SimpleMoveList < Qt::ListView
include Plugin
@@ -46,8 +47,8 @@ class SimpleMoveList < Qt::ListView
move = @history[i].move
san = @serializer.serialize(move, state)
- count = i / 2 + 1
- dots = if i % 2 == 0
+ count = (i + 1) / 2
+ dots = if i % 2 == 1
'.'
else
'...'
--
2.11.4.GIT