Re: [code] [textadept] Column position displayed on status bar

From: Mitchell <m.att.foicica.com>
Date: Wed, 10 Jul 2019 19:00:40 -0400 (EDT)

Hi,

On Wed, 10 Jul 2019, Qwerky wrote:

> Hi,
>
> On 2019-07-10 15:49, Mitchell wrote:
>> Hi,
>>
>> On Wed, 10 Jul 2019, Qwerky wrote:
>>
>>> Hello again,
>>>
>>> The status bar displays the current column position using
>>> 'buffer.column[pos]
>>> + 1', which is fine most of the time.  However, when the caret is in
>>> virtual
>>> space, the status bar displays the last column containing text, rather
>>> than
>>> the actual current column.  (Just type a letter, and the status bar will
>>> update to the current column.)
>>>
>>> Is there a variable like the one above which may be referenced, or a
>>> function
>>> which may be called, to return the actual current column number even when
>>> within virtual space?
>>
>> I'm looking at the Scintilla documentation[1], but not finding anything.
>> This is probably a good question for the scintilla-interest mailing list.
>>
>> Cheers,
>> Mitchell
>>
>> [1]: https://scintilla.org/ScintillaDoc.html
>> [2]: https://groups.google.com/group/scintilla-interest
>
> Okay.  Just before doing that, one more question.  SciTE does display the
> actual column in the status bar, as desired, so it does seem to be possible. 
> In the Scintilla documentation I found the function 'SCI_GETCOLUMN'; I don't
> know whether or not this is the function used by SciTE (or is this the
> function used by Textadept)?  :-)

`buffer.column[pos]` calls `SCI_GETCOLUMN`. You'll probably have to play around with it if SciTE indeed does what you expect.

Textadept has a Lua interface to Scintilla. Check out the `buffer` documentation[1]. Generally, separate words with underscores, use `buffer:name()` notation for non-get/set messages, and use `buffer.prop` notation for get/set messages.

Cheers,
Mitchell

[1]: https://foicica.com/textadept/api.html#buffer

-- 
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 10 Jul 2019 - 19:00:40 EDT

This archive was generated by hypermail 2.2.0 : Thu 11 Jul 2019 - 06:35:53 EDT