# SynEdit - Version history and changelog

### Contributors:

> Andre Mens, Andrey Ustinov, Andy Colson, Anthony Steele, Arentjan Banck, Bruno Mikkelsen, Colin Laplace, Daniel Parnell, David H. Muir, Dean Harmon, Eden Kirin, Erik B. Berry, Falko Jens Wagner, Flávio Etrusco, Gerald Nunn, Jan Fiala, James D. Richardson, Jeff Rafter, Johan Visser, Jonathan Halterman, Jordan Russell, Lasse Vagsather Karlsen, Lorant Toth, Maël Hörz, Marko Njezic, Martin Pley, Mattias Gaertner, Michael Beck, Michael Hieke, Morten J. Skovrup, Murad Kakabayev, Pieter Polak, Primoz Gabrijelcic, Roman Silin, Satya, Sheng Quanhu, Sören Spröβig, Stefan van As, Steve Sutherland, Sven Blankenberg, Tony De Buys, Woo Young Bum

## [SynEdit 1.04]

- Various files:
  - Pieter Polak (plpolak):
    - Add sample source to many highlighters
  - Sheng Quanhu:
    - Fix MBCS compatibility to many highlighter's UnknownProc.
  - Colin Laplace (claplace), Daniel Parnell (dparnell):
    - Kylix port
  - Jordan Russell (jrx):
    - Delphi 6 port
- SynMacroRecorder
  - Flávio Etrusco
    - New component to allow macro recording and playback in TSynEdit
- SynCompletionProposal
  - Dean Harmon, Gerald Nunn
    - fixed cursor dissapearing from editor problem
    - added param completion ability
    - added limit to matching text ability
    - lots of enhancements and bug fixes
- SynEditPlugIns
  - Flávio Etrusco
    - New general objects to implement plugins to the TSynEdit component
- HighlighterDemo:
  - Pieter Polak (plpolak):
    - New demo to demonstrate the use of the SynGen utility in combination with the .msg grammar files to create a custom highlighter.
- MultiSynDemo:
  - Leon Brown:
    - New demo to demonstrate the use of the TSynMultiSyn component to highlight CSS and JScript inside of HTML files.
- SynHighlighterCPM.pas:
  - Pieter Polak (plpolak):
    - Highlighter for COAS product manager report (.rdf) files.
- SynHighlighterDfm.pas:
  - Pieter Polak (plpolak):
    - Add the 'inherited' keyword, for use in 'form inheritance' .dfm files.
- SynHighlighterGeneral.pas:
  - Jan Fiala:
    - IsKeyword function now uses AnsiCompareStr to compare keywords in the keyword list.
- SynHighlighterIDL.pas:
  - Pieter Polak (plpolak):
    - Highlighter for CORBA .idl files.
- SynHighlighterInno.pas:
  - Jordan Russell (jrx):
    - Now highlights keywords from the more recent versions of Inno Setup, up to 2.0.18.
    - Fixed highlighting of quotes inside quoted strings, constants inside constants, and comments with spaces before them.
  - Michael Hieke (mh):
    - Added code to highlight "string" as keyword or parameter.
  - Satya:
    - Updated for the most recent version IS / ISX 1.3.25.
- SynHighlighterJScript.pas:
  - Eden Kirin (ek):
    - Added four keywords moveTo, moveBy, resizeTo, resizeBy.
- SynHighlighterM3.pas:
  - Martin Pley (mp):
    - Fixed bug that keywords were considered case-insensitive.
- SynHighlighterMPerl.pas:
  - Murad Kakabayev:
    - Added much better implementation of Perl highlighter, which needs to be integrated with the package.
- SynHighlighterMsg.pas:
  - Pieter Polak (plpolak):
    - Highlighter for SynGen .msg files.
- SynHighlighterMulti.pas:
  - Lorant Toth:
    - Fix a bug that causes the highlighter not always to recognize the start and ending expressions correctly.
- SynHighlighterPas.pas:
  - Pieter Polak (plpolak):
    - Add Delphi 6 keywords to the list + add a new property 'DelphiVersion' which allows selection of which Delphi dialect to be highlighted..
- SynHighlighterPHP.pas:
  - Eden Kirin:
    - Fixed incorrect highlighting of "\\" (with the quotes).
  - Jordan Russell:
    - Fixed incorrect highlighting of \' inside a single-quoted string.
- SynExportRTF.pas:
  - Sheng Quanhu (sqh):
    - Fixed bugs in method ReplaceMBCS.
- SynHighlighterSDD.pas:
  - Pieter Polak (plpolak):
    - Highlighter for Semanta database data dictionary files..
- SynHighlighterSQL.pas:
  - Various SynEdit developers:
    - Many new keywords and fixes.
- SynHighlighterXML.pas:
  - Jeff Rafter:
    - Highlighter for XML, which still needs to be added to SynEditReg and D4Demo app.
- SynGen
  - Pieter Polak (plpolak):
    - Improved the generated source code, by including MBCS compatibility, Kylix compatibility, C++ builder 1 compatibility, and including the SynEdit GPL/MPL comment header.
    - Added new sections (ENCLOSEDBY and SAMPLESOURCE) to the grammar file to allow creation of a complete highlighter via the grammar file only.
    - Add a 'howto' document on how to create your own highlighter using a .mg grammar file.
- SynEditMiscClasses.pas:
  - Jeff Rafter (jcr):
    - Added Assign methods to the TSynBookmarkOpts and TSynSelectedColor classes.
- SynEditMiscProcs.pas:
  - Jordan Russell (jr):
    - Fixed several helper functions to be MBCS-compatible.
- SynEdit.pas:
  - Various SynEdit developers (Dean Harmon, Flávio Etrusco, Gerald Nunn, Peiter Polak, Jordan Russell, sblbg):
    - Full tab support
    - Caret positioning tweaks
    - new editor options
      - eoScrollHintFollows: The scroll hint follows the mouse when scrolling vertically
      - eoSmartTabDelete: similar to Smart Tabs, but when you delete characters
      - eoEnhanceHomeKey: enhances home key positioning, similar to visual studio
      - eoSpecialLineDefaultFg: disables the foreground text color override when using the OnSpecialLineColor event
      - eoGroupUndo: When undoing/redoing actions, handle all continous changes of the same kind in one call instead undoing/redoing each command separately
      - eoRightMouseMovesCursor: When clicking with the right mouse for a popup menu, move the cursor to that location
      - eoHideShowScrollbars: if enabled, then the scrollbars will only show when necessary. If you have ScrollPastEOL, then it the horizontal bar will always be there (it uses MaxLength instead)
      - eoDisableScrollArrows: Disables the scroll bar arrow buttons when you can't scroll in that direction any more
      - eoAutoSizeMaxLeftChar: Automatically resizes the max left char when adding lines
      - eoShowSpecialChars: Shows the special Characters
    - lots of bug fixes
  - Jeff Rafter (jcr):
    - Added checks for ReadOnly at several places where text still could be changed.
  - Jordan Russell (jr):
    - Added message handler for WM_CAPTURECHANGED to cancel scrolling.
    - Small modification in method MouseMove to smooth caret movement when the control is scrolled with the mouse cursor outside the client area.
    - Fixed MBCS bug in TCustomSynEdit.PixelsToRowColumn.
    - Made TCustomSynEdit.NextWordPos & PrevWordPos MBCS-aware.
    - Fixed hint window bug with Delphi 3.
    - Middle button clicks no longer move the caret.

## SynEdit 1.03 released 2000-11-26

- Various files:
  - Andre Mens:
    - Several file names and class names had to be changed for SynEdit to be installed parallel to the mwEdit package into the IDE.
    - RegExpr.pas was moved to the Source folder and renamed to SynRegExpr.pas. There is a more recent version available (2000-07-23), but this would need much more work as internals have changed.
    - uTextDrawer.pas was renamed to SynTextDrawer.pas.
    - In SynCompletionProposal.pas the name of the base class TCompletion was changed to TSynBaseCompletion.
- SimpleIDEDemo:
  - Michael Hieke:
    - New demo to show how to change the line colors for breakpoint lines and the current line, and how to draw gutter marks without adding TSynEditMark objects, which is inappropriate for marks to be drawn in nearly every line (like "line is executable"). Shows a simple use of SynEdit plugins.
- SynHighlighterM3.pas:
  - Martin Pley:
    - Added new highlighter for Modula-3.
- SynHighlighterModelica.pas:
  - Falko Jens Wagner:
    - Added new highlighter for the Modelica language.
- SynMemo.pas:
  - Anthony Steele (as):
    - Made methods CharIndexToRowCol and RowColToCharIndex public.
- SynEditAutoComplete.pas:
  - Mattias Gaertner (mg):
    - Fixed bug that last entry of an DCI file was not added to the list of completions.
    - Spotted bugs with off-by-one error in caret position when not in first line, and with appended line breaks.
- SynHighlighterSQL.pas:
  - Daniel Parnell (djlp):
    - Added more Oracle keywords.
    - Added support for the REMARK SQL*Plus keyword.
    - Added public properties PLSQLAttri, DefaultPackageAttri, SQLPlusAttri.
  - Johan Visser (jjv):
    - Added missing keywords for Oracle 8i and fixed some typos, source reformatted.
    - Added new dialect Ingres.
  - Michael Hieke (mh):
    - Computation of hash values includes numeric chars now, because some keywords use them.
- SynEditStrConst.pas:
  - Daniel Parnell (djlp):
    - Added SYNS_AttrDefaultPackage, SYNS_AttrPLSQL, SYNS_AttrSQLPlus
  - Falko Jens Wagner:
    - Added language name and default filter for the Modelica language highlighter.
- SynEditPrint_Old.pas:
  - Michael Hieke (mh):
    - Added public properties MarginBottom, MarginLeft, MarginRight, MarginTop, MarginUnits.
    - Implemented word-wrap for printing without a highlighter.
    - Fixed bug with word-wrap when printing without a highlighter.
- SynEditPrint.pas:
  - Daniel Parnell (djlp):
    - Added published properties Color and TabWidth.
  - Johan Visser (JJV):
    - Added new property DocTitle to show in the queue list in print manager.
- SynEditExport.pas:
  - Michael Hieke (mh):
    - Added new virtual abstract function FormatBeforeFirstAttribute to allow for a different format, needed by the HTML exporter, and it is a Good Thing in terms of generalization.
- SynExportHTML.pas:
  - Erik Berry (eb):
    - A new enum value fsDefault allows for exporting HTML in the default font size.
  - Michael Hieke (mh):
    - New virtual abstract function FormatBeforeFirstAttribute overridden to keep the single <font> tag for the font size and font face around the whole exported text.
- SynExportRTF.pas:
  - Michael Hieke (mh):
    - Implementation of FormatBeforeFirstAttribute added, calls the normal FormatAttributeInit.
- SynHighlighterPas.pas:
  - Michael Hieke (mh):
    - Simplified the code dealing with the rsProperty range state.
- SynHighlighterADSP21xx.pas:
  - Michael Hieke (mh):
    - Added missing SetAttributesOnChange call to the constructor.
- SynHighlighterHP48.pas:
  - Michael Hieke (mh):
    - Had to add calls to TSynHighlighterAttributes.InternalSaveDefaultValues (see next entry), because this highlighter is a little weird...
- SynEditHighlighter.pas:
  - Daniel Parnell (djlp):
    - Added virtual method IsKeyword.
  - Michael Hieke (mh):
    - Modified the classes TSynCustomHighlighter and TSynHighlighterAttributes, so that the token attributes as set by the constructor of the highlighter are preserved as the defaults, and only different color or font style settings are saved to the DFM file.
- SynEditMiscClasses.pas:
  - Michael Hieke (mh):
    - Added new property DrawBookmarksFirst to the TSynBookMarkOpt class (it is initially True to keep the code compatible), when set to False gutter marks will be drawn as in the Delphi IDE.
- SynEditMiscProcs.pas:
  - Michael Hieke (mh):
    - Modified tab-expansion code to optionally return the information whether the line contained a tab char.
- SynEditTextBuffer.pas:
  - Daniel Parnell (djlp):
    - Added InsertLines, InsertStrings and DeleteLines methods.
  - Michael Hieke (mh):
    - New class TSynEditStringList replaces the TSynEditList class. This new class has a field for the range information, so the Objects property of the stringlist finally can be used in SynEdit. Can also write strings with LF only (UNIX files), albeit this is not surfaced in the editor control.
    - Added a read-only property ExpandedStrings.
    - Added code to return the length of the longest (expanded) line, to show a proportional horizontal scrollbar in the editor control.
    - New change reasons crSilentDelete and crSilentDeleteAfterCursor to hide the selection during undo/redo of internal editor commands.
  - Steve Sutherland (sbs):
    - Added code to allow for grouped undo/redo of several changes; this can be used programmatically (for instance for undoing a Replace All), but a real group undo for everything is not possible (yet).
- SynEdit.pas:
  - Daniel Parnell (djlp):
    - Added public property OnClearBookmark.
    - Added code to speed up insertion and deletion of large amounts of text.
  - Lorant Toth (lt):
    - Modified MouseDown method to not clear the selection when the right mouse button is clicked and the editor control has no PopupMenu attached (could be assigned to the parent control).
  - Michael Hieke (mh):
    - Modified the ecInsertLine/ecLineBreak part of the ExecuteCommand method, which would not add a new line for a certain combination of option flags (eoAutoIndent, but not eoScrollPastEol).
    - Changes to use the new stringlist class TSynEditStringList instead of TSynEditList. Parameter type of ListAdded method changed, ListScanRanges method removed.
    - Added support for new bookmark option to switch the order of bookmarks and other marks in the gutter.
    - Added new option eoKeepCaretX to keep the horizontal caret position when vertical scrolling hits a shorter line.
    - For eoScrollPastEol not set the horizontal scrollbar is now proportional to the longest tab-expanded line.
    - ExecuteCommand method rewritten for the editor commands ecDeleteLastChar, ecDeleteChar, ecDeleteWord, ecDeleteLastWord, ecDeleteBOL and ecDeleteEOL, now information is correctly saved to allow for multiple undo/redo of the commands.
    - Commands ecDeleteChar and ecDeleteLastChar do not select anything now during undo/redo.
    - Fixed undo/redo for trailing spaces when eoScrollPastEol is not set.
    - Fixed wrong caret position after undo of ecDeleteChar.
    - Added code to clear the redo information when new undo information is added (this is necessary because the redo context is lost).
    - Undo/redo of drag-drop operations keeps selection now.
    - New option eoAltSetsColumnMode, when set the SelectionMode is toggled between smColumn and smNormal when text is selected with the mouse (depending on the state of the Alt key).
  - Steve Sutherland (sbs):
    - Added code for (programmatic) grouped undo/redo.
    - Fixed bug with undo/redo code for the ecLineBreak editor command.

## SynEdit 1.02 released 2000-10-03

- SynEditTextBuffer.pas:
  - Michael Hieke (mh):
    - Added code to reset the Modified property when all changes are undone.
- SynHighlighterASM.pas:
  - Eden Kirin (ek):
    - Fixed NumberProc method to highlight hexadecimal numbers.
- SynEditPrint.pas:
  - Sven Blankenberg (sb):
    - Changes to expand tab chars in the SetLines method, added FTabWidth field.
    - Fix to the TextOut method where right margin was ignored when no word-wrap or no highlighter.
    - Optimization: FTestString was replaced with FMaxWidth.
- SynEditKeyCmds.pas:
  - Jordan Russell (jr):
    - Added a default keystroke for Shift+Backspace and ecDeleteLastChar.
- SynEditSearch.pas:
  - Michael Hieke (mh):
    - Fixed access violation in method Next.
- SynEditHighlighter.pas:
  - Michael Hieke (mh):
    - Added SampleSource property (for syntax highlighter option dialogs).
    - Added overridden Assign method to copy token attributes and samplesource.
- SynMemo.pas:
  - Michael Hieke (mh):
    - Made published properties SelStart and SelEnd public.
- SynEdit.pas:
  - Andy Colson (abc):
    - Fixes regarding the new eoTrimTrailingSpaces option flag code.
  - Jon Foster (jgf):
    - Made trimming of trailing whitespaces an option (eoTrimTrailingSpaces, default to preserve compatibility with old versions).
    - Vertical scrollbar does behave now like in TMemo, old behaviour (like Delphi editor) via the new option flag eoScrollPastEof.
    - Fixed bug that pressing Return in the last fully visible line of a control would not scroll the then active line into view.
  - Jordan Russell (jr):
    - Added ClearSelection method.
    - Added code to the DragDrop method to reselect the dropped text block.
    - New implementation of scrolling code, modelled after the Delphi editor; it uses a timer now (new field fScrollTimer added) instead of calling Sleep. Pressing Shift will scroll in pages. The scrolling speed depends on the distance from the client area of the control.
    - Changed the fTopLine field to be 1-based as the TopLine property, property read method removed. Together with the same change to LeftChar, CaretX, CaretY this reduces code size.
    - Added some missing calls to SizeOrFontChanged after changes to highlighter settings.
  - Michael Hieke (mh):
    - Fixed some small bugs with plugins (code for inserted vs. deleted lines was mixed up), and changed the ecInsertLine / ecLineBreak part of the TCustomSynEdit.Execute method (line with caret is now included if caret is in first column of line).
    - Some changes to the ecInsertLine/ecLineBreak part of the ExecuteCommand method to fix problems with range highlighting (inserting a line would destroy range information).
    - Drag and drop editing code rewritten, it allows now for drag and drop between different TCustomSynEdit controls and uses line/column positions instead of char indices. Bug with undo fixed.
    - CS_HREDRAW and CS_VREDRAW class styles removed.
    - Fixed the new behaviour of the vertical scrollbar to adjust the TopLine property on resizing of the control and after changes to the text.
    - Protected method InvalidateGutter renamed to InvalidateGutterLines, added public method InvalidateGutter.
    - Changed the fLeftChar, fCaretX, fCaretY fields to be 1-based as the properties, property read methods removed (done for consistency with the similar change by Jordan). Changed the code to use the properties instead of the fields internally, since the compiler handles this now.
    - Added code to reset the Modified property when all changes are undone.
- SynHighlighterMulti.pas:
  - Tony De Buys (LAD):
    - Added a GetIdentChars method to the TSynMultiSyn class.
- SynHighlighterVBScript.pas:
  - Lasse Vagsather Karlsen (lvk):
    - Added the keywords "ByRef" and "ByVal".
- SynHighlighterSQL.pas:
  - James D. Richardson (jdr):
    - Added new SQL dialect for MySQL.
  - Lasse Vagsather Karlsen (lvk):
    - Added new SQL dialect for MS-SQL 7.
  - Michael Hieke (mh):
    - Added new SQL dialect for Interbase 6.
    - Fixed bug in TSynSQLSyn.StringProc, spotted by Andy Colson (a backslash would stall the highlighter).
- SynHighlighterInno.pas:
  - Satya:
    - Updated for compatibility with the most recent version 1.3.18 of Inno Setup and ISX.

## SynEdit 1.01 released 2000-07-28

- SynCompletionProposal.pas:
  - Michael Hieke (mh):
    - Fixed a random AV in TSynCompletionProposal.Destroy (fEditors was accessed in Notification method after it was freed).
- SynEdit_D3.dpk:
  - David H. Muir (dhm):
    - Added package file for Delphi 3.
- SynEdit_BCB4.*, SynEdit_BCB5.*:
  - Jonathan Halterman (jh):
    - Added package files for C++ Builder 4 and 5.
- SynEditTextBuffer.pas:
  - Michael Hieke (mh):
    - Changed fLocked field to fLockCount. Removed the Locked property, added methods Lock and Unlock instead. Every call to TCustomSynEdit.LockUndo has to be matched now with a call to UnlockUndo!
- SynHighlighterInno.pas:
  - Satya:
    - Updated for compatibility with the most recent versions of Inno Setup and ISX.
- SynHighlighterJScript.pas:
  - Michael Hieke (mh):
    - Added code to handle the rsANSI range for multiline comments.
- All highlighter files:
  - Michael Hieke (mh):
    - Added several IFDEFs to make the code compilable with BCB1.
- SynEditPrint_Old.pas:
  - Roman Silin (rs):
    - Added the PrintFilter property to select which pages to print (all, only odd, only even pages).
- SynEditExport.pas:
  - Arentjan Banck (ajb):
    - Fixed bug that HTML header of exported data contained wrong size information.
  - Daniel Parnell (djlp):
    - Added code to destroy private field of type TFont in TSynCustomExporter.Destroy.
- ScanTokensDemo:
  - Michael Hieke (mh):
    - Added new demo to show using a highlighter to scan source text in a background thread and gather information about tokens.
- SynEditKeyCmds.pas:
  - Andy Colson (ac):
    - Added public LoadFromStream and SaveToStream methods to the TSynEditKeystroke and TSynEditKeystrokes classes.
- SynHighlighterSQL.pas:
  - Daniel Parnell (djlp):
    - Fixed bug in TSynSQLSyn.AsciiCharProc where closing string delimiter was ignored when first char in line of multi-line string.
  - Johan Visser (jjv):
    - Added missing keywords, missing data types and missing functions to the Oracle dialect, fixed some typos and reordered stuff.
- SynEdit.pas:
  - Colin Laplace (cl):
    - Fixed small bugs in handler methods for WM_HSCROLL and WM_VSCROLL.
  - Daniel Parnell (djlp):
    - Added abstract plugin ancestor class and list of plugins to the TCustomSynEdit class.
    - SetSelTextExternal method modified.
  - Michael Hieke (mh):
    - Reordered the code in the destructor to free the fields that might reference other fields first, the basic fields at last. fBookmarkOpt is set to nil because the Notification method tests for this field.
    - Changes to match every LockUndo with an UnlockUndo, because modified SetSelTextExternal caused multiple calls of LockUndo and UnlockUndo. See also changes to the TSynEditUndoList class.
    - Fixed bug that OnStatusChange event was not called for changes to Modified property.
  - Sven Blankenberg (sb):
    - Fixed bug in TCustomSynEdit.SearchReplace() where search results would be changed even when change was skipped (wrong caret position).

## SynEdit 1.0 released 2000-06-28

`$Id: ChangeLog.htm,v 1.5.2.1 2004/10/09 18:34:26 maelh Exp $`