[code][textadept] Initialization issue III

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Wed, 15 Nov 2017 17:03:10 -0300

Hi Mitchell,

     I found the problem in lbuf_closure() function @ textadept.c line 1244:

static int lbuf_closure(lua_State *L) {

   Scintilla *view = focused_view;

   if (lua_istable(L, 1)) {

     int result = l_globaldoccompare(L, 1);

     if (result != 0) view = (result > 0) ? dummy_view : command_entry;

The test in the last line "(result > 0)" must be replaced with "(result != -1)" because l_globaldoccompare() returns 0, -1 or the Scintilla
document's pointer.

The issue fires when the returned doc pointer looks like a negative number!!

Cheers,

Gabriel

-- 
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 Wed 15 Nov 2017 - 15:03:10 EST

This archive was generated by hypermail 2.2.0 : Thu 16 Nov 2017 - 06:36:28 EST