Re: [code] Textadept-curses for WIN32: Cursor/screen problems

From: Mitchell <>
Date: Wed, 26 Feb 2020 08:19:25 -0500 (EST)

Hi Gavin,

On Tue, 25 Feb 2020, Gavin Holt wrote:

> Hi,
> I know the standard windows console is "limited", but I have noted a
> few problems. I know some of these are hard to address, but I thought
> I would list them anyway for reference:
> 1. Can't display any popups in the buffer: I am having problems with
> the popup symbol autocomplete (^Space) and the snippet popup when
> selections are offered. There is a flicker on my screen, but the
> popups are not visible. For the autocomplete none of the options are
> selectable, with the snippets I can get the first option only. I am
> pretty sure the commands function because when only one autocomplete
> option is available it gets inserted (e.g. A Lua file "string.s" will
> expand to "string.sub"). Test case in a Lua file is "math.f" which
> should display a popup with "math.floor, math.fmod, math.frexp".

This is likely a bug. Thanks for the report.

> 2. Cursor invisible at the insertion point using find & replace panel,
> or any dialog: At present in textadept-curses for WIN32 the insertion
> cursor is invisible when using the "find & replace pane" or any dialog
> (e.g. Goto). There is a blinking underline in column zero at what
> appears to be a random row.

This may be a bug in PDCurses (the terminal toolkit Textadept uses). The terminal version on other platforms shows the cursor properly.

> 3. Can't change fold/wrap indicators with standard WIN32 console
> fonts: On most of the machines I use I do not have permission to
> change the console font outside the defaults - and its not easy even
> if you do have permission! The current coded fold and wrap indicators
> do not have a character in these default fonts, they both appear as
> identical small boxes. Would it be possible to reassign these
> characters in my init.lua? I would like to choose a wrap indicator
> which displays as a "space", i.e invisible. Any other method of making
> the wrap indicator invisible would be acceptable.

Try experimenting with these:

I suggest the plus/minus symbols.

> 4. Annoying shadows on the screen: As I edit with textadept-curses
> some actions result in one, or more, or many, transient vertical lines
> (?occupying the vertical line cursor pixels on the left of the
> character cell) png attached. These tend to disappear after a full
> screen redraw. It doesn't stop me working but is mighty distracting.

If you could identify which actions this occurs during, I can perhaps force a screen redraw so that you don't see those artifacts.

> 5. Single mouse clicking inside a highlighted selection does not
> remove/alter the selection, nor does it move the insertion point: This
> is not the expected behavior, I would normally expect the selection
> to "unselect" and the cursor insertion point to move to the clicked
> location. Test by selecting all and then try to click out. (This is
> only in the nightly build)

I'll look into this.

> 6. Shift drag does not scroll: When selecting text with the mouse, you
> can only go as far as the bottom/top of the visible screen. I would
> like to be able to scroll as we select using the wheel and by dragging
> "beyond boundaries".

This would be a nice feature. I'll look into it.

> 7. Can't alter buffer.caret_style: At present buffer.caret_style does
> not really work in textadept-curses for WIN32 unless set to "2". I
> would prefer an underline or vertical line cursor so it does not get
> confused with the block highlighting of braces.

All terminal versions use block carets. You can try changing the color of the brace highlight indicator to better differentiate it from the caret:

   local INDIC_BRACEMATCH = textadept.editing.INDIC_BRACEMATCH
   buffer.indic_fore[INDIC_BRACEMATCH] = property_int['color.yellow']

> I think Textadept-curses is the best 9MB on my USB stick. One single
> executable with a few Lua DLLs - the speed and power is addictive! I
> am sorry I don't have the skills to offer solutions to these issues,
> hopefully some of my other contributions are helpful.

Your reports are most helpful. Thanks so much for taking the time to write them up. You've encouraged me to try using this version more frequently when I'm on Windows, so hopefully that will keep it better maintained.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 26 Feb 2020 - 08:19:25 EST

This archive was generated by hypermail 2.2.0 : Thu 27 Feb 2020 - 06:48:54 EST