From 71eab6d5d72145f17ab3d4c87945ac12176ae8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 3 May 2017 18:00:52 +0200 Subject: text: remove text_history_get function As currently implemented this does not properly integrate with multiple cursor support. The functionality should be provided in a layer higher up. The jumplist and changelist need to be redesigned, for now they are broken. --- text.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'text.c') diff --git a/text.c b/text.c index c49599b..4c7fdc2 100644 --- a/text.c +++ b/text.c @@ -1675,15 +1675,3 @@ size_t text_mark_get(Text *txt, Mark mark) { return EPOS; } - -size_t text_history_get(Text *txt, size_t index) { - for (Revision *rev = txt->current_revision ? txt->current_revision : txt->history; rev; rev = rev->prev) { - if (index-- == 0) { - Change *c = rev->change; - while (c && c->next) - c = c->next; - return c ? c->pos : EPOS; - } - } - return EPOS; -} -- cgit v1.2.3