Author Topic: FOX 1.7.64 released  (Read 7231 times)


  • JVZ
  • Administrator
  • Full Member
  • *****
  • Posts: 174
  • Karma: +3/-0
  • FOX Toolkit Developer
    • View Profile
    • FOX Toolkit
FOX 1.7.64 released
« on: February 20, 2018, 09:57:24 PM »
Released 1.7.64 today.  A lot of time has been going into updating FXRex with the ability to reverse regular expressions.  At this time, this works, but is primarily of interest for so-called positive or negative (arbitrary length) look-behind.  In terms of regular expression syntax, this means expressions like (?<= pattern) and (?<!pattern).

However, implementing these features pretty much meant implementing the entire matcher with a reverse capability. This having been done, I was wondering if it would be useful to call the reverse matcher directly, with the code from a reversed pattern (since we have that capability too).

Primarly applications for something like this would be the implementation of a more powerful syntax highlighting capability.  But who knows, people who match DNA sequences might just find this useful also.

The other major effort, still under way, is augmenting FXText for block selection.  At this time, the machinery for block-selection and display has been mostly implemented, but we still need to go through the whole widget and decide for many functions where a special handling is needed if the selection is a block rather than a linear range of positions.

A particular problem with the block selection is the possible presence of tabs, or the fact that a block can extend past the end of the line.
Lines with tabs behave a bit oddly when a block containing tabs gets hauled to a new column; since tab positions are defined w.r.t. the start of a line, a block containing tabs which gets moved to a different column may need to get re-tabbed.

This is now done with a new internal function called tabbify().  The tabbify() routine retabs one or more lines of text from an old tab-start to a new tab-start.  Along the way, it also may replace spaces with tabs or vice-versa, and apply additional indentation.

The new tabbify() is already used in shiftText(), and if you try it you will see that text containing tabs will now shift correctly.