#1456 Geany backfills with spaces when typing within virtual space

scintilla (333)

Originally reported as Geany bug 3608066

When the caret is placed in virtual space and a letter is typed, Geany back-fills using spaces. When the indentation mode is TABs, tabs should be used.

For instance, set indentation mode to TABs and open a source-code file which uses tabs for indentation. Go the the end of the file. Use the enter key to add a few blank lines. Go to Document -> Strip trailing spaces. Use the right arrow key to move to a column which is several tab widths in from the left border. Type a letter.
Since the editor mode is TABs, Geany should have inserted tabs to the left of the letter just typed. Instead, spaces are inserted.

Comment by elextr:
The virtual spaces are done by Scintilla, not by Geany.

When you position the cursor in virtual space and type a character, all
Geany is told is that some spaces and a character have been inserted.
Geany can't distinguish if that was the user or the "virtual" spaces.

Since Scintilla has been told the indent type, this should be raised as a
Scintilla bug. (www.scintilla.org)


  • Neil Hodgson

    Neil Hodgson - 2013-03-17
    • labels: --> scintilla
    • assigned_to: Neil Hodgson
    • priority: 5 --> 4
  • Neil Hodgson

    Neil Hodgson - 2013-03-17

    This is somewhat messy since the caret may be in indentation or may be after text, in which case tabs may not be wanted even when they are wanted for indentation.

    I'll accept a well-written patch that uses spaces when not in indentation. I won't be working on this myself.

  • Rogue

    Rogue - 2013-03-18

    Say I'm editing source and I want to keep things in columns. I'm modifying existing code, adding a new column to the right of existing text.

    I go the the first line, go to the end of line, tab a bunch to clear the longest line in the group below, and start typing.

    Then I hit ctrl+left to get back to the start of the column I'm creating and hit down-arrow. I'm now at the start of the new column on the next line.

    I start typing. What is the back-fill? Is this the gray area mentioned in your reply?

    Note in the last line of your reply the phrase "a well-written patch that uses spaces".

    This is totally wrong. If I say use tabs, it seems to me that what I mean is, I want tabs. If I start typing at a column that is not a tab-stop, then spaces are required to reach the next tab stop. This is not rocket science. Once at the tab stop, gee, what should I do??? Perhaps use tabs? Maybe thats why the Geany user said "use tabs"? I fail to see why this is "somewhat messy".

  • Neil Hodgson

    Neil Hodgson - 2013-03-18

    The first comment talked about 'indentation mode' which has no bearing on post-indentation whitespace. The indentation mode should only affect indentation, never post-indentation whitespace. If you want to have settings for post-indentation whitespace then they should be separate and clearly defined.

  • Neil Hodgson

    Neil Hodgson - 2016-09-05
    • status: open --> open-fixed
  • Neil Hodgson

    Neil Hodgson - 2016-09-05

    Bug [#1850] covering the case within indentation was fixed with [19b88d].
    Using tabs post-indentation is a different case and should be a new feature request if desired.



    Bugs: #1850
    Commit: [19b88d]

  • Neil Hodgson

    Neil Hodgson - 2016-09-05
    • status: open-fixed --> closed-fixed

Log in to post a comment.