Re: [code] How to replace the "Untitled" buffer

From: Markus F.X.J. Oberhumer <markus.att.oberhumer.com>
Date: Sun, 14 Feb 2016 13:52:39 +0100

Hi Robert,

On 2016-02-14 10:56, Robert Gieseke wrote:
> Hi Markus,
>
> Am 14/02/16 um 03:01 schrieb Markus F.X.J. Oberhumer:
>> thanks for your code - actually the version below seems to work for me.
>
> glad to hear it works!
>
>> Which problems did you see?
>
> In the GUI version the list after the INITIALIZED event is empty (after
> typing something, triggering a refresh it works), in the Curses version
> it works fine. Do you use the terminal version?

actually I had seen that and patched it in my local textredux version...

Cheers,
Markus

diff --git a/core/list.lua b/core/list.lua
index 91218c7..4c8ec54 100644
--- a/core/list.lua
+++ b/core/list.lua
@@ -313,6 +313,9 @@ function list:_refresh()
   -- Items.
   data.items_start_line = buffer:line_from_position(buffer.current_pos)
   local nr_items = buffer.lines_on_screen - data.items_start_line - 1
+ if buffer.lines_on_screen == 0 then -- FIXME - textadept bug ???
+ nr_items = 9999
+ end
   self:_add_items(data.matching_items, 1, nr_items)
   buffer:goto_line(data.items_start_line)
   buffer:home()

>
> Cheers,
> Robert
>

-- 
Markus Oberhumer, <markus@oberhumer.com>, http://www.oberhumer.com/
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 14 Feb 2016 - 07:52:39 EST

This archive was generated by hypermail 2.2.0 : Mon 15 Feb 2016 - 06:48:12 EST