Minimum Profit Release Notes
============================

5.62
----

* New features:

The `seek-matching' action in HTML and XML syntax modes also matches open/close tags (not only brackets) (Tiny).

If a document has MSDOS-like end of lines (CR/LF), it's shown in the status line (Theo).

Added syntax highlight for `org-mode' documents (*only* syntax, not operations) (Tiny).

Added syntax highlight for the hare programming language (contributed by Andy Atwood).

New VCS command `git grep' (contributed by aov).

[mptxt] Added support for versalita (smallcaps) text (contributed by aov).

* Fixed bugs:

Action `open_under_cursor' really works over `@@' marks in diff files (Claire).

5.61
----

* New features:

When the `tab' is hit while editing Makefiles, real tabs are always inserted, regardless of the configured tab to spaces conversion. This has been implemented by adding an optional function named pre_event(doc, key) inside a syntax highlight definition, that does the appropriate key conversion and it's called from mp_doc.pre_event() (contributed by aov).

Some enhancements to the hex viewer: character groups (control, printable, zeros, etc) are shown in different colors and a vertical, a left/right movable column is shown as a positioning aid, the `ctrl-g' keycode asks for an address offset to jump (Theo).

Input read from VCS commands is truncated to at most 2000 lines. This is to avoid waiting forever after commands that dump humungous amounts of data, e.g. from the `git log' of a very big project (contributed by Bix1994).

New clipboard configuration knobs: if the `mp.config.clipboard_file' variable is set to a usable file name, it's used as the interchange space instead of the system clipboard; if any of the `mp.config.clipboard_copy_prg' or `mp.config.clipboard_paste_prg' are set to program names, they are used as pipes to write to/read from the content of the clipboard (Claire).

A history of saved files (up to 100) is now stored inside the subdirectory `history' of CONFDIR as hard links (only supported on UNIX-like systems).

* Fixed bugs:

Fixed a bug when editing numbers in TUI forms (Tiny).

* Other changes:

Replaced usage of strcpy() and sprintf() with other functions to placate some paternalistic compilers (Claire).

5.60
----

* Fixed bugs:

The `section_list' action no longer shows strange lines when the terminal is too short (Theo).

Fix NCurses background color setting (contributed by X-Ryl669).

* New features:

New syntax highlight for roff manual page sources (contributed by Mr. Firefly).

New syntax highlight for INI-style files, like the ones used by `systemd' (contributed by Mr. Firefly).

New syntax highlight for fountain files (a markup language for screenwriting) (contributed by aov).

5.59
----

* New features:

New syntax highlight for Rust (contributed by X-Ryl669).

New syntax highlight for Markdown (contributed by Susan Bompensiero).

Syntax-highlight definitions can include their own `matching_open' and `matching_close' strings that override the global ones (Tiny).

5.58
----

* Bug fixes:

Hangups in GTK pasting (it seems it also fixes similar cases in Qt) (contributed by mrnav79).

Data loss when breaking a line in very special circumstancies (contributed by Andrew F. Atwood).

[ANSI] Added a timeout for terminal size detection (Claire).

[Curses] Keycodes alt-minus and alt-plus (Claire).

Very minor issues in some syntax highlight definitions.

* Other changes:

The `word_count' action also shows the number of characters in the file or the selection (Theo).

Changed real tab visualization (Theo).

[mptxt] Added support for bullets in troff (contributed by aov).

[mptxt] Added support for images using the img:// pseudo-url (contributed by aov).

5.57
----

* Important changes:

All configuration files have been moved to the `mp' subfolder inside a system-dependent configuration folder. This folder is under the `~/.config' path (or the content of the XDG_CONFIG_HOME environment variable) in UNIX-like systems or under the user application data path in MS Windows (the system value for CSIDL_LOCAL_APPDATA). Currently existing files are automatically moved to this new location (Theo).

* Bug fixes:

[ANSI] Increased color detection waiting time for slow terminal emulators like `mate-terminal' (Theo).

5.56
----

* New features:

[ANSI] The `mp.config.ansi_rgbcolor' configuration variable can now be set to: 2, force the use of RGB color; 1, autodetect; or 0: disable completely and use traditional 16 colors. Autodetection is done by asking the terminal for color information and disabling RGB use if there is no valid response. Please take into account that some terminal emulators and multiplexers (e.g. `tmux' or `st') do not report color information even though they totally support it (contributed by Susan Bompensiero).

* Other changes:

[mptxt] Lines ending with < are left-aligned (contributed by aov).

5.55
----

* Important notice:

The source code repositories of submodules MPDM and MPSL have merged into main Minimum Profit (mp-5.x). If you build MP from Git sources, you must execute `make distclean' and reconfigure.

* Bug fixes:

[ANSI] Bold / bright color confusion (contributed by X-Ryl669).

[Curses] Bold / bright color confusion (contributed by X-Ryl669).

Some tokens were not shown in MPSL syntax highlight (Claire).

Completion works in MPSL syntax highlight (Claire).

5.54
----

* New features:

New syntax highlight definitions for the Go language (contributed by HooverNixie).

* Bug fixes:

Using \x{HEX} to enter Unicode characters in search and replace works again (Claire).

* Other changes:

[mptxt] Right-aligned lines have been implemented; they are marked with a leading >. Additionally, centered lines can also be marked between and > and < (contributed by aov).

5.53
----

* New features:

Added italic text in syntax highlight comments to all drivers that support it (Theo, Tiny).

* Bug fixes:

Some cursor positioning issues in the `seek_matching' action (Theo).

* Other changes:

Some tweaks to syntax highlight definitions (C, JSON) and a new one for email messages (Claire).

On architectures that don't support archive embedding, zip files can also be used (Theo).

5.52
----

* Bug fixes:

[Qt] Fixed compilation issues (contributed by PamM0rel).

Memory leak in double screen mode (Tiny).

5.51
----

* New features:

New actions `move_para_up' and `move_para_down', to move the cursor to the beginning of the previous or next paragraph (Claire).

Related to the above, actions `move_section_up' and `move_section_down' behave like `move_para_up' and `move_para_down' when the file being edited has no section definitions (e.g. on plain text files) (Claire).

[ANSI] When copying text into the clipboard, ANSI code OSC 52 is emmited; if the underlying terminal emulator supports it (for example, xterm under X11), this code will transfer MP's clipboard to the system one. This works even if MP is running on a remote server via SSH (Theo).

* Improvements:

Added section detection for Gemini / Gemtext files (contributed by cox778).

[ANSI] Added more alt+character keycodes (unused, free for user remappings). Specifically, all alt+number keycodes are usable (Theo).

Added more bracket and quoting character pairs for `seek_matching' action and visual matching (contributed by aov).

* Bug fixes:

Fixed a wrapping-related error in the directory editor, that could cause failures when renaming files (contributed by MrNix94).

[win32] Force fonts to be FIXED_PITCH (contributed by Michael F. Woods).

* Other changes:

[GTK] Set default font size to 10, like in Qt and windows drivers (contributed by Michael F. Woods).

5.50
----

* Critical bug fixes:

Fixed a severe font bug in both MS Windows 32 and 64 bit.

5.49
----

* New features:

Periodic saving of documents has been implemented (not overwriting the original path, but in a different place) to prevent data loss in case of editor or computer crashes. On startup, if recovery files are detected, they are opened for further inspection. The period (in seconds) can be configurable by the `mp.config.auto_save_period' variable. If it's set to 0, automatic saving of files is disabled.

New action `replace_next' (not bound by default to any key, only from the menu).

* Bug fixes:

The usage of & as a placeholder for the matched text in the `replace' functions works again.

Vertical copy works again under GUI interfaces.

5.48
----

* Improvements:

[ANSI] Added double buffering, improving general speed and response (Theo).

Words explicitly ignored from the spellchecker (detected by calling the `seek_misspelled' action and disabled by calling `ignore_last_misspell') are now stored in the state so that they are not forgotten in next sessions (Tiny).

Also, these user-included words are also taken into account for completion if spellchecking is active (Tiny).

New syntax highlight definitions for Gemini / Gemtext files (contributed by cox778).

5.47
----

* Improvements:

The spellchecking code has been optimized for speed (Tiny).

Updated italian translation (contributed by Sergio).

New syntax highlight definition for git logs and release notes (Tiny).

New git operation to show a log from the latest tag (Tiny).

* Bug fixes:

[ANSI] Allow remapping single character keycodes like the rest of the drivers (Theo).

Fixed rare crash in attribute filling under OpenBSD (Claire).

[Win32] Set `mp.config.eol' to `\r\n' also under 64bit Windows (Tiny).

[ANSI] Fixed bad processing of a repetitive string of backspace characters (Theo).

[TUI] Fixed initial position in lists (contributed by FltkLover).

* Other changes:

If defined, the XDG_CONFIG_HOME environment variable is used instead of a hardcoded `$HOME/.config' (contributed by aov).

New function `mp.copy()', to copy a string or array into the clipboard (Tiny).

5.46
----

* Improvements:

In text interfaces, typing on a selection list filters by text the elements shown (contributed by FltkLover).

New configuration variable `mp.config.dark_mode', to switch between dark / light color modes (default: 1, dark) (Claire).

* Important changes:

Visual wrapping is now on by default. If text disappearing beyond the right margin is preferred, you can set the configuration variable `mp.config.visual_wrap' to 0. Also, remember that visual wrapping can always be toggled using the `ctrl-k' keycode (Theo).

If the `~/.config' directory exists, the user configuration file is assumed to be `~/.config/mp.mpsl' (unless a traditional `~/.mp.mpsl' file already exists) (Theo).

* Bug fixes:

Fixed word count when visual wrapping is on (Claire).

* Other changes:

The `word_count' action also shows an (approximate) number of pages.

5.45
----

* Bug fixes:

Strange behaviour in `delete_left' action at the beginning of a document (Tiny).

Hangup in a corner case when mixing visual word wrapping and hard word wrapping (Theo).

Strange colors in newer ncurses (contributed by X-Ryl669).

In the ANSI driver, set the default attribute before deleting up to the end of line to avoid spurious inverse colors in not-very-smart terminal emulators like kitty (Tiny).

* Improvements:

Better config.sh configurability and package detection (contributed by rofl0r).

5.44
----

* Bug fixes:

Fixed backwards search (hungups and skipped matches).

Fixed ugly attributes at exit in the ANSI driver.

Fixed compilation in GTK v.2.

Fixed JSON syntax highlight.

5.43
----

* New features:

The MPSL source is deployed in .zip format, so the disk footprint is smaller.

5.42
----

* New features:

Speed improvements in ANSI and ncurses drivers. This will be specially noticed in slow systems like the oldest Raspberry Pies.

In build (makefile) and grep logs, the ENTER key activates the `open_under_cursor' action.

* Bugfixes:

Fixed a rounding error in emacs-style scrolling.

5.41
----

* Bug fixes:

Fixed crash in Qt5 startup.

Fixed typo in Perl syntax highlight.

5.40
----

* Important changes:

New software maintainers.

5.39
----

* New features:

The usage of Unicode characters in text menus, games, etc. can be disabled by setting the configuration variable `mp.config.use_unicode' to 0.

* Other changes:

Some internal optimizations to visual wrapping code.

5.38
----

* New features:

A new visual wrap mode, where lines longer than the application window wrap (with special marking) instead of disappearing to the right. It's implemented in the `toggle_visual_wrap' action (bound by default to `ctrl-k') and can be activated from the configuration file by setting `mp.config.visual_wrap' to 1.

* Other changes:

When hard word wrapping is not set, the `word_wrap_paragraph' action behaves like `join_paragraph' (i.e. word-wraps to an infinite column).

5.37
----

* Bug fixes:

Fixed compilation issues under FreeBSD and OpenBSD.

* New features:

New game 'Puzzle'.

5.36
----

* Bug fixes:

When using -f or -F, compiler errors are returned.

Fixed not-that-read-only read-only documents.

Fixed crash in GTK clipboard.

The Qt driver now shows less 'shaky' text.

* Other changes:

The Unicode character to show tabs is now U+2192.

The mptxt export functions now manage 'strong' and 'em' spreading multiple lines.

5.35
----

This release includes a big set of new features and bugfixes by fellow developer X-Ryl669.

* Important changes:

Some default keycodes have been changed:

`ctrl-space' now triggers `complete' instead of the menu.
`shift-f10' now opens the menu in text interfaces.
`ctrl-u' now calls `complete_with_clang' instead of previous `complete'.

* New features:

History (search, replace, etc.) is saved.

Interactive search when entering filenames in text interfaces (work by X-Ryl669).

Reduce the number of undo while typing (once every second at maximum) (work by X-Ryl669).

Allow hint to also select directories in file selector (work by X-Ryl669).

Add support for mouse wheel scroll down event on ncurses (work by X-Ryl669).

Add support for showing list wherever we want in text interfaces (work by X-Ryl669).

Make tag completion inline with context instead of on a new window in text interfaces (work by X-Ryl669).

Add support for multiline editing: When you have selected multiple lines in a rectangular block, and started inserting text, it'll be reproduced on all lines (work by X-Ryl669).

Added clang completion for C/C++ languages (work by X-Ryl669).

HTML export now includes a page break in CSS.

Added footer page number in troff exporting.

Added footer page number in RTF exporting.

New command line argument -F, to execute an MPSL script and exit immediately after.

Tabs are always shown differently from spaces.

* Bug fixes:

Fixed a serious bug in GTK redraws.

Fixed crashes in Qt5.

Fixed directory walk up in text interfaces file browser (work by X-Ryl669).

Fixed block marking options from the main menu.

Fixed insert_time_stamp action.

Fixed some bugs in completion.

Fixed a bug when drawing double-width characters (they were sometimes printed twice).

Fix a of-by-one error in the vertical selection code while deleting (work by X-Ryl669).

Fix a of-by-one error in indenting a block of many selected lines where the last line was never indented (work by X-Ryl669).

Fix a bug that's crashing mp when loading a session (work by X-Ryl669).

Fixed Qt building.

5.34
----

* New features:

New syntax highlight definitions for RTF files.

* Bug fixes:

The GTK clipboard code has been rewritten to support copy / paste of characters with high Unicode points.

Fixed some memory leaks in underlying libraries.

5.33
----

* New features:

Double page mode: if the viewport screen is wider than the value in mp.config.double_page (default: 120), two pages are shown simultaneously. If you don't like this mode, set mp.config.double_page to 0 in the configuration file.

New command line option -ni for "non-interactive" mode. Expected to be used with -e or -f. No video driver is tried and it exists immediately after executing the code or script.

Native encoding support for Windows-1252 code page.

* Other stuff:

A new script `ms-windows-build.sh', to build 32 and 64 bit MS Windows binaries using mingw32.

5.32
----

* New features:

There is a new version format (2) for encrypted files. The cypher algorithm is the same, but includes a CRC, so that it's possible to know if the content has been correctly decrypted (i.e. the decryption password is valid). New encrypted documents use version 2, but version 1 documents are not automatically upgraded. If you want to do it, open a version 1 document, hit ESC, type `mp.active.crypt_ver = 2' and save it back. *NOTE*: This encryption format, though it uses a known algorithm, has not been audited by anyone remotely versed in cryptography, so you are at your own risk.

The ANSI driver now support 256 color; if the config variable `mp.config.ansi_color256' is set to non-zero, the 'gui' color definitions shall be used instead of the usual 'text' definitions.

In Linux and similar systems, both a .desktop and icon files are installed.

In the 'build target' list, also add the generic syntax-dependent build targets at the end (i.e. when editing a Python file in a Makefile-controlled folder, the execute and syntax check options are shown at the end).

New mptxt exporting to .troff format.

New mptxt exporting to .html format.

* Other changes:

The `export_as_rtf' action no longer exists; it has been replaced by `export'.

There has been many internal changes due to both MPDM and MPSL being moving targets, now that they are heavily refactored. None of these changes add anything new nor fix previous bugs.

Fixed some whining about deprecated usage in GTK driver.

In the easter egg / hidden game 'Maze', pressing f1 shows a compass hint instead of the hero.

5.31
----

* Important changes:

License change: released into the public domain.

* Improvements:

The RTF export function has been rewritten. The generated markup is much better and shows OK in most of the inconsistent, crappy world of the RTF reader implementations.  Also, there are several configurable options (see the `doc/mp_configuration.txt' document).

* Bug fixes:

Many that I don't remember. Mostly they were new bugs introduced by changes in MPDM and MPSL.

Fixed Curses driver, broken some versions ago.

* New features:

There is native encoding support for MSDOS 437 and 850 page codes.

New Pascal syntax highlight (yes, Pascal, no kidding). I've been digging in very old shit.

The ANSI driver now accepts alt-letter keycodes.

The execute MPSL code function always dumps its output to the dump window.

5.3.0
-----

 - Architectural changes:
   - Major refactoring; old code pruned and cleaned, memory
     management improved.
   - MPSL code is no longer deployed as separate files, but
     embedded in a tar file or inside the program binary itself.
   - Some MPSL code is loaded on demand.
   - New "portable" (i.e. no installation needed) versions for
     MS Windows.
 - New features:
   - New action `insert_m_dash', bound by default to `alt-minus'.
   - New action `replace_tabs_with_spaces'.
   - New action `replace_spaces_with_tabs'.
   - New action `open_recent', to pick the file to open from
     the previosly opened ones.
 - Other changes:
   - Versioning have changed from x.x.x to x.yyy.
   - The coloring theme for GUI drivers has changed to something
     with dark background and softer colors. If you want to revert
     the classic, bright colors on white background theme, copy
     and paste the following into the configuration file:

    /* Minimum Profit Classic */
    mp.colors.normal.gui        = [ 0x000000, 0xffffff ];
    mp.colors.cursor.gui        = mp.colors.normal.gui;
    mp.colors.selection.gui     = [ 0xff0000, 0xffffff ];
    mp.colors.comments.gui      = [ 0x00cc77, 0xffffff ];
    mp.colors.documentation.gui = [ 0x8888ff, 0xffffff ];
    mp.colors.quotes.gui        = [ 0x0000ff, 0xffffff ];
    mp.colors.matching.gui      = [ 0x000000, 0xffff00 ];
    mp.colors.word1.gui         = [ 0x00aa00, 0xffffff ];
    mp.colors.word2.gui         = [ 0xff6666, 0xffffff ];
    mp.colors.word3.gui         = [ 0x000088, 0xffffff ];
    mp.colors.tag.gui           = [ 0x8888ff, 0xffffff ];
    mp.colors.spell.gui         = [ 0xff8888, 0xffffff ];
    mp.colors.search.gui        = [ 0x000000, 0x00cc77 ];

5.2.15
------

 - Fixes:
   - A severe bug in the GTK driver. Sometimes comboboxes
     in forms do not correctly show the default value. This
     can be specially troublesome in the "Line options"
     form because the end-of-line separator can be
     accidentally set to an empty string and destroy
     newly created files.

5.2.14
------

 - Fixes:
   - In Qt5, as there is no equivalent of Qt4's
     QApplication() creator with an X11 Display object as
     argument, there is no other way of detecting a
     non-functioning X11 environment than checking the
     existence of the DISPLAY environment variable, so that
     is what is used to fall back to text mode.
   - Cancellation of the opening of hexadecimal dumps
     works again.
   - The "git checkout" option in the VCS has been removed,
     as I keep constantly hitting it by error.
   - The `scroll_up' and `scroll_down' actions has been
     swapped, so they make much more sense.
   - After a word-wrapping is done, the horizontal visual
     column is set to 0, as it's expected to do.
   - Makefile output is left at the end of the file (where
     fail / success information is most probably found instead
     of the beginning of the file).
   - GTK driver uses GDK_SELECTION_CLIPBOARD instead of
     GDK_SELECTION_PRIMARY for copy / paste.
   - GTK form lists are correctly scrolled to show the
     selected item.
   - Text in GTK is correctly copied to the clipboard as
     utf-8 encoded.
- New features:
   - A new `export_as_rtf' action, to write current text
     as a very basic RTF file. Words surrounded by asterisks
     are written as strong text and surrounded by underscores
     as emphasized text. Also, form feeds (ascii 0C) are
     converted to page breaks.
   - A new `insert_page_break' action, to insert an ASCII
     page break character (FF, 0x0C).

5.2.13
------

 - New features:
   - This release includes Qt5 support.

5.2.12
------

 - New features:
   - This version includes a new driver for raw ANSI terminals,
     for systems who don't (want to) have libncursesw.
   - The cursor position for every file is remembered from
     session to session.
 - Fixed bugs:
   - Fixed action `open_under_cursor' (again).
   - Fixed behaviour inconsistency between actions `seek' and
     `seek-next'.
   - Fixed action `sync' (save all modified files).
 - Other features:
   - Version numbering convention has changed: development
     versions shall no longer have (CURRENTVERSION+1)-dev,
     but (CURRENTVERSION)-patch.

5.2.11
------

 - This version includes the following lot of features by
   fellow developer X-Ryl669:
    - New cut line action (copy and delete line), bound by
      default to ctrl-k.
    - New key assignation to document list (ctrl-e).
    - Fix ncurses detection for recent distributions.
    - Added suspension (bound to ctrl-l) for curses driver.
    - Added word selection with mouse double-click.
    - Paste in ncurses prompt.
    - New seek matching brace feature, bound to ctrl-j.
    - Text search wraps to the top of the document as many
      other text editors do.
    - Several miscellaneous fixes.
 - Other features:
    - Window position and size is saved in all GUI interfaces.

5.2.10
------

 - New features:
   - New configuration directive mp.config.show_line_numbers,
     to show line numbers to the left of each line.

5.2.9
-----

 - New features:
   - New configuration directive mp.config.emacs_scrolling, to
     enable/disable emacs-like scrolling (half screen jumps
     instead of line-by-line).
   - New actions `scroll_up' and `scroll_down', bound by
     default to `alt-cursor-up' and `alt-cursor-down'.
   - New syntax highlight for JSON files.

5.2.8
-----

 - New features:
   - Mouse support on text interfaces (it can be disabled by
     setting mp.config.no_text_mouse to 1).
   - Support for the MS Windows console. Two win32 binaries are
     now deployed: the classic, windowed mp-5.exe and the new,
     console-based, mp-5c.exe.
   - Added column to action `grep'.

5.2.7
-----

 - New features:
   - File format dependent build targets (to be used if a Makefile
     is not found in the current directory).
   - `open_under_cursor' also works over diff file marks (those
     starting with @@).
   - New configuration directive `make_opts', for command line
     options to be added to `make'.
   - Search and replace accepts Unicode chars in \x{HHHH} format.
   - The status line format string can also include the %u token
     to show the Unicode codepoint of the character under the cursor.
 - Fixed bugs:
   - Fixed hexdump search.
   - Avoid having zero-size marks.

5.2.6
-----

 - Fixed grep.

5.2.5
-----

 - New features:
   - Hex view is searchable.
   - New syntax highlight for JavaScript.
 - Fixed bugs:
   - Avoid crashes in `play_macro' action.
   - Fixed failing menus on Qt4.
   - Fixed file renaming errors in the directory editor.
 - Important changes:
   - Default tab settings has been changed to convert to 4 spaces.

5.2.4
-----

 - New features:
   - A new directory editor, linked to the new `open_folder'
     action, that allows file deletion and renaming.
   - New configuration directive `font_weight'.
   - New action `insert_time_stamp', that inserts the current
     timestamp according to the format in the
     `mp.config.time_stamp_format' configuration directive.
 - Changes:
   - mp.add_keyseq() has been reimplemented and no longer needs
     the initial [, as it already assumes it's used only for ANSI
     sequences (so you may need to tweak your own definitions).
 - Fixes:
   - Dynamic tab tweking.
   - Avoid hangups when trying to highlight 0 size regexes.
   - Minor VCS fixes.
   - Revert can be undone.

5.2.3
-----

 - New improvements:
   - New actions `move_section_up' and `move_section_down'
     (bound by default to `alt-cursor-up' and `alt-cursor-down').
   - VCS commands can have a common or private log.
   - The menu has been reorganized.
   - Keycode targets can also be other keycodes (not only editor
     actions), so they can be used as aliases.
   - Encodings are now selected from a list.
   - The Curses interface now includes a read-only scrollbar.
   - A much faster hexadecimal viewer.
 - Other changes:
   - Al MP code has been refactored to use new MPSL object-oriented
     capabilities.

5.2.2
-----

 - Major improvements:
   - Added Version Control commands (bound by default to `ctrl-p').
     The supported systems are (adding new ones is very easy):
     - Git
     - Subversion
     - Mercurial
   - If any file being edited is modified externally, the situation
     is detected and the user is prompted for file reloading.
   - GTK library detection: Uses 3.x if available, then 2.x.
   - Special information gathering on help: if the file being edited
     is C/C++ and asking for help (by pressing `F1') do not return
     a `man' page, a special routine inspects all source files and
     headers looking for structures, variables and function prototypes
     to be shown as help.
   - If a template name starts with #!, the template body is assumed
     to be MPSL code, that will be executed and its value returned
     as the template to be inserted.
   - New "Pipes" game.
   - New `check_for_updates' action.
 - Fixed bugs:
   - Make `keep_eol' behaviour more intuitive (bug #1294).

5.2.1
-----

 - New actions:
   - `indent_block': Indents the current line or the selected block.
   - `unindent_block': Reverse of `indent_block'.
 - New features:
   - ~/.mp_templates can be a directory. If it is, the `global' file
   there is always read (and those templates put at the top) and it
   will also read a file named like the current syntax highlight
   definition (so different templates appear if your editing C, Perl,
   etc.).
 - New configuration options:
   - `mp.config.smart_bol': if set to nonzero, the `move_bol' action
     now moves to the first non-blank character in the line instead of
     to column 0 (unless the cursor is already on the first non-blank).
 - Other improvements:
   - The following actions accept additional arguments when called
     as functions (and do not ask for them, if present):
     - `goto'
     - `save_as'
     - `exec_command'
     - `filter_selection'

5.2.0
-----

 - New actions:
   - `filter_selection': to filter the selection (or the
     full document if no selection is done) through a system command.
   - `exec_action': that shows a list of actions to execute
     on the current document.
   - `cut_lines_with_string': that cuts to the clipboard all lines
     in a document or block that matches a regular expression.
   - `insert_real_tab': bound to `shift-tab', to insert a tab
     character (\t) regardless of whatever is set in the
     `tabs_as_spaces' configuration variable.
   - `insert_next_item': to insert a new enumeration item in
     a document.
 - Bugfixes:
   - Fixed insert / overwrite mode.
   - If a selection is invisible (incomplete or with the start and end
     in the same character), a new keystroke does not jump to it.
 - New configuration options:
   - `mp.config.hw_cursor': to activate the hardware cursor in
     text environments (disabled by default).
 - Text user interface improvements:
   - File opening list is fully navegable (directories up and down),
   - Selection lists accept letter keys to jump to elements,
   - If a text mode menu panel do not fit vertically on the screen,
     menu items are scrolled as needed.
 - New command line options:
   - `-txt': force text mode (instead of GUI).
 - General improvements:
   - If a block is selected, actions `word_wrap_paragraph',
     `join_paragraph' and `eval_doc' act only on it.
   - The internal engine has been partly rewritten, so it requires
     less memory and it's a bit faster.

5.1.4
-----

 * If a block is selected, any keystroke substitutes it.
 * Support for Alt + keys (ASCII and movement) has been added,
   and mostly left unbound to be used by the user for his own
   keybindings.
 * A new tab mode, which uses the previous line as a template
   for tab columns.
 * Fixed action `open_under_cursor'.
 * The `mp.paste()' function returns the clipboard content
   as a string if called without arguments.
 * New Grutatxt syntax highlighter.
 * Fix F10 in Win32.
 * Fix a bug when calculating the drawing position in the
   selected block, that were leading to crashes.

5.1.3
-----

 * A new Qt4 driver (adapted from the KDE4 driver).
 * A new hexadecimal viewer.
 * New action `open_dropped_files', to open files dropped from
   the underlying system GUI.
 * Improved file encoding autodetection by looking at the
   UTF BOM marks.
 * New configuration option `keep_eol', to keep the original
   end of line sequence each document had.
 * Fixed some clipboard issues, as replacing the selected block
   when pasting and some crashes.
 * win32 executable has been renamed to `mp-5.exe'.
 * The status line format string can also include the %e token
   to show the encoding used by the document.
 * Fixed win32 input processing in non-latin environments.
 * Setting an empty encoding (to fall back to system defaults)
   always work.

5.1.2
-----

 * The `grep' action can now be recursive.
 * New syntax color for special documentation blocks.
 * Fix searching into empty selected blocks (this was bug #1269).
 * New action `section_list', that shows a list of _sections_
   in the current document to jump to. Sections are usually
   function definitions and special marks in programming
   languages.
 * New action `seek_misspelled', to search the next
   misspelled word. It has been assigned to keycode `f5'.
 * New action `ignore_last_misspell', to add the last misspelled
   word found by `seek_misspelled' to a whitelist so it won't
   be found again.
 * New action `seek_repeated_word', to search for words starting
   or ending with the same number of letters up to a maximum
   distance. It's controlled by the new configuration directives
   `mp.config.rw_num_chars' and `mp.config.rw_max_dist'.
   It has been assigned to keycode `f6' (this keycode was
   previously assigned to `join_paragraph', which has no
   keybinding now).
 * The action `open_templates_file' has been fixed.
 * Several GTK interface updates by fellow developer Sebastian Vöcking.
 * New command line option `-d', to change the working directory.
 * Several fixes to the win32 driver; word wrapping, combobox
   drop-down sizes, underlined text.
 * Avoid hanging if the external ispell program is broken.
 * The `dump()' function now dumps its argument as MPSL code.

5.1.1
-----

 * Internationalization works in all platforms (including KDE4,
   were it was faulty, and win32, where it was non-existent since
   the 3.x series).
 * The status line format string can also include the %w token
   to show the number of words in the current document or selection
   (can be slow).
 * Search and replace is now limited to the selected block, if any.

5.1.0
-----

Fixes to the KDE4 driver:

 * Underlined text works.
 * Text fields in forms now have history.
 * If no xserver can be contacted, fall back to the curses interface.

5.1.0-rc1
---------

 * KDE4 support.
 * Rectangular block copy/paste support.
 * New syntax highlight for the Euphoria language.

5.0.3
-----

 * New action `open_under_cursor', that picks the word in the
   current document under the cursor, accepts it as a document
   name and tries to open it. If it's in the format string:number,
   is accepted as a file name and a line number. It's bound by
   default to `ctrl-enter' (`alt-enter' under Curses).
 * The `grep' action bevahaviour has changed; instead of in a form,
   matches are shown in a read-only document that is only closed
   explicitly. Each change can be moved to by using the new
   `open_under_cursor' (`ctrl-enter' or `alt-enter') action shown above.
 * In a similar way, the `build' action also shows its output in a
   read-only document instead of a form that is not automatically closed,
   making the browsing and editing of compilation errors more useful.
 * Forms in the Curses driver have changed their look. All fields in a
   form are shown simultaneously on screen. This is one step to close
   bug #1249.
 * A set of character encoding converters have been natively implemented,
   improving those platforms where the 'iconv' library is not available
   (i.e. Windows and old Unix systems). The available encodings can be
   shown by executing

	dump(EMBEDDED_ENCODINGS);

5.0.2
-----

 * New option to mark end of line characters, with its associated
   configuration directive (mp.config.mark_eol).
 * The end of line string (mp.config.eol) is now system-dependent (so,
   on win32, it's set by default to \r\n).
 * Copy and paste on GTK has been fixed (this was bug #1205).
 * Fixed some redrawing issues (bug #1236 and others).
 * Ctrl-keys no longer fail on GTK (bug #1252).
 * New document _Minimum Profit Action Reference_.
 * New action `build', for building Makefile-based projects. See the
   action reference for details.

5.0.1
-----

 * Improved line edition in the Curses interface (full edition plus file
   expansion using the `tab' key in open / save file prompts).
 * Auto-indenting is temporarily disabled while pasting (bug #1250).
 * New document _Minimum Profit Function Reference_ (contributed by Lee Page).

5.0.0
-----

 * The search hit is highlighted.
 * When invoked from the menu, the `record_macro' action dropped
   the last key (bug #1245).
 * A Curses configuration detection has been fixed that made
   some things behave strangely, as the drop-down menu not
   responding under some terminal configurations (bug #1247).
 * The Curses menu no longer crashes if it doesn't fit on
   the screen (bug #1195).
 * The -f (execute script) command line argument really works
   (bug #1240).
 * New manual page (bug #1219) and README files (bug #1218).
 * Updated documents, _MPSL Overview_ and _Minimum Profit Cookbook_.
 * New documents, _Minimum Profit Data Model_ and
   _Creating interactive dialog boxes_.

5.0.0-rc3
---------

 * New session support. All open documents and its current position
   can be stored / retrieved with the new `save_session' and
   `load_session' actions. Two new configuration flags has
   been added: `mp.config.auto_sessions', to automatically load / save
   sessions, and `mp.config.local_sessions', to save sessions in the
   currently active directory instead of in the home directory.
 * Multiple key sequences for invoking actions (ala Emacs) are
   now possible. To create them, just assign a hash to a keycode
   instead of an action. For example, to assign the key sequence
   Ctrl-x Ctrl-f to `open' and Ctrl-x Ctrl-s to `save', you can use

	mp.keycodes['ctrl-x'] = {
		'ctrl-f'	=> 'open',
		'ctrl-s'	=> 'save'
	};

 * In the curses version, confirmations now have default values
   (shown in brackets), activated with the ENTER key.
 * New action `close_all', that closes all documents.

5.0.0-rc2
---------

 * New `complete' action, that asks for completion on the current
   word using any of the words found in the same document.
 * New `redo' action, to revert undo operations.
 * The global configuration file `/etc/mp.mpsl' is also executed.
 * In the `replace' action, the substitution string can contain
   the special character &, that will be replaced by the matched
   string (as in the `sed' command line tool).

5.0.0-rc1
---------

 * New support for translating key sequences into MP keycodes, mainly
   for redefining ANSI sequences not supported by current terminfo /
   termcap. For example, if your terminal sends the ANSI sequence [6;5~
   whenever you press Ctrl+page down, you can add to your config file
   the following line:

	mp.add_keyseq("[6;5~", 'ctrl-page-down');

 * A new `system_command' action, to pipe from and to system commands
   (Closed bug #1120).
 * A new `word_count' action, to count the number of lines and words
   in a document (or in the selected block).
 * Incorrect word wrapping has been fixed (Closed bug #1137).
 * Search and replace expand backslashed characters like \n and \t
   (Closed bug #1214).
 * New timer functionality has been added; a user function can be called
   each time a specified period of milliseconds have elapsed. If, for
   example, you want to print a string on standard output each two
   seconds, you can run

	mp.timer(2000, sub { print("Hi, world!\n"); });

5.0.0-pre1
----------

 * Password-protected files fully work.
 * Moving to next / previous instance of character (bound to ctrl-page-down
   and ctrl-page-up) works (Closed bug #1131).
 * Files open MUCH faster.
 * Selection can be done by pressing shift + any movement key (Closed bug #1182).
 * Dialog boxes work under Windows 98 (Closed bugs #1196, #1197).
 * Block selection can be done by dragging the mouse (Closed bugs #1200, #1201).
 * New `grep' functionality (Closed bug #1116).
 * New action `sync' (save all modified documents, closed bug #1206).
 * New action `document_list' (show a box with all open documents, allowing
   the selection of the active one; closed bug #1211).
 * Translations ported from mp 3.x (closed bug #1169).
 * Most syntax highlight definitions ported from mp 3.x (closed bug #1168).

4.99.12
-------

 * The menu in the Curses interface has been (finally) implemented.
 * Interfaces have changed internally; a new driver function, mp.drv.form()
   serves as a dialog box generic generator, resulting in more useful queries
   for data (for example, all data required for a `replace' operation is
   queried in only one dialog box). The Curses implementation, though
   functional, is still just a wrapper to the old interface functions
   and fields are queried one-by-one (which is annoying). This is an example
   of a call to mp.drv.form(); the r variable will contain an array of 5
   elements (one per widget) containing the values, or NULL if user cancelled:

	local r = mp.drv.form( [
	
		/* a 'text' widget */
		{ 'label'	=> "Replace this:",
		  'type'	=> 'text',
		  'history'	=> 'search',
		  'value'	=> 'THIS' },
	
		/* another one */
		{ 'label'	=> "With:",
		  'type'	=> 'text',
		  'history'	=> 'replace',
		  'value'	=> 'THAT' },
	
		/* a 'password' widget */
		{ 'label'	=> 'Password:',
		  'type'	=> 'password' },
	
		/* a 'checkbox' widget */
		{ 'label'	=> "Case sensitive:",
		  'type'	=> 'checkbox',
		  'value'	=> mp.config.case_sensitive_search },
	
		/* a 'list' widget */
		{ 'label'	=> 'All C files:',
		  'type'	=> 'list',
		  'list'	=> glob('*.c'),
		  'value'	=> 10 }
	] );

 * Password protecting files works (but they cannot be opened yet, so this
   is far from useful, unless you use mp 3.x to open them).
 * Case sensitivity in searches can be controlled with the new
   config flag mp.config.case_sensitive_search.
 * Replace (and global replace by use of the new config flag
   `mp.config.global_replace') works.

4.99.11
-------

 * Syntax highlight definition have changed (again, hopefully for the last
   time). Definitions are now an array of attribute name / regexes in which
   the order is significative.
 * Template insertion works.
 * Tag selection (open the file where a symbol is defined) works.
 * Symbol completion (using tags) works.
 * Closed bugs #1159, #1158, #1153, #1161.

4.99.10
-------

 * A big advance in the Curses interface; alerts, confirmations, and open
   file, save file, search and generic prompts are working. Still lacking
   the selection lists (as the rest of interfaces) and the menu.
 * Improved menus; if an invalid action is added to a menu, it's shown
   followed by a ?; if a key is bound to that action, it's shown between
   square brackets.
 * For systems lacking iconv support (MS Windows), a crappy, ad-hoc utf-8
   converter has been added. This means that hitting `escape' and typing
   `encoding('utf-8');' makes reading and writing utf-8 encoded files
   possible on every system.
 * New action `join_paragraph', to join current paragraph all in one line.
 * New action `word_wrap_paragraph', that re-word-wraps current paragraph.
   Word wrapping must be set ('mp.config.word_wrap = number;') for this to
   work.

4.99.9
------

 * The GTK and win32 drivers now include a native open/save file dialog.
 * Interactive help (help for the word under the cursor, triggered by
   pressing `f1') works.
 * The menu in GTK and win32 works.
 * New icon!
 * Some bugs that caused random crashes has been fixed.
 * New action `exec-doc', that executes the active open document as
   MPSL code.

4.99.8
------

 * New configuration option `mp.config.tabs_as_spaces', to store tabs
   as spaces.
 * Each syntax highlight definition can contain an optional function
   called detect() that receives the document as argument and can be used
   to tailor special detection rules.
 * A big part of the internal storage of colors and attributes have
   been rewritten to make it more dynamic.
 * Tag target for the word over the cursor is shown in the status line.
 * Move word left works.
 * Opening an already open file makes it the active one instead of
   re-opening it.
 * The `execute code' action has been remapped from `ctrl-f1' to escape.
 * Spellchecking via ispell works (though it's SLOW!). Activate it by
   hitting escape and typing:

	mp.ispell(1);

 * By default, files are now unlinked before (re)written. File permissions
   and ownership are restored if available. This behaviour can be disabled
   by setting `mp.config.unlink' to zero.
 * The GTK driver drawing code has been optimized, so it's much more
   responsive now.

4.99.7
------

 * The `modified' flag of documents is maintained, so now closing files
   with pending modifications ask for confirmation. Also, the %m status
   line directive works (marking modified files with an asterisk).
 * Flex and bison are no longer needed to build.
 * The `close window' button in GUIs (win32 and GTK) now generate the
   special keycode `close-window'.
 * The `exit' action now closes all open documents, asking for saving
   confirmation on those modified.
 * Temporary versions of the `open' ans `save' actions (using
   mp.drv.readline() instead of an ad-hoc open file dialog) have
   been implemented.
 * The GUI interfaces now can have their font preferences configured
   by using mp.config.font_face and mp.config.font_size.
 * The actions `zoom-in' and `zoom-out' (font size rescaling, bound to
   `f11/f12' and `ctrl-kp-minus/ctrl-kp-plus') have been implemented.
 * New mouse-related actions; `move-to-mouse-position', `move-mouse-wheel-up'
   and `move-mouse-wheel-down'.

4.99.6
------

This is an EXPERIMENTAL version for evaluation purposes only. There are
many things that aren't implemented, others fail miserably and many more
do it incorrectly. Basically, what is known to work is:

 * Basic text editing fully works. I've been using it for six months or so
   to maintain itself, and there has not been a crash in three months,
   more or less.
 * Scripting works fine (90% of Minimum Profit 5.x itself is implemented
   in MPSL, its internal scripting language).
 * Undo works fine. It's bound to ctrl-z.
 * Works cleanly in an UTF-8 environment.

I do development on the GTK version, so it's where it works best. The
curses version lacks many of the interface (alerts, confirmations,
asking for text, etc.), so it's barely usable. The win32 version seem
to work, but it needs to be manually installed and probably need some
tweaking.

What it doesn't work:

 * The dialogs to open or save a file by its name aren't implemented.
   There are workarounds for this: files can be opened from the command
   line and save works correctly if the edited file has a name. Also,
   files can be opened by hitting `ctrl-f1' (execute script code) and
   typing:

	mp.open("file-to-be-opened");

 * There is no menu.
 * No ispell support.
 * No password protected files.
 * No grep.
 * No external commands (so no support for help, tags, etc.).
 * Some movement commands as moving a word left, moving to matching
   brackets, etc. are still not implemented.
 * Only a few syntax highlight definitions are implemented.
 * Many other things I cannot remember.

Documentation is still scarce: the more interesting bits are inside the
mpsl/doc directory. This is where the scripting language is documented,
with some basic overviews and implementation notes (there is even an
embryo of a PostScript quick reference guide).

Customizing can be done by writing MPSL commands in the ~/.mp.mpsl file,
which is read on startup.

I have not tried to optimize the internal engine, so it's probably some
magnitudes slower than the 3.x version.
