Code editor — version history
A code editor with syntax highlighting — line numbers, region folding, search, file drop — to type or display code, an SQL query or a configuration file. Introduced in 1.0.
4.0 — October 2026 #
New #
- Replace:
of_replace(the first occurrence from the caret) andof_replace_all(all of them, undone with a single Ctrl+Z, returning the number of replacements), and Ctrl+H in the search bar; with a regular expression, the replacement accepts$1,$&and$<name>. - Search options
ib_find_match_case,ib_find_whole_word,ib_find_regex(the Aa, ab and .* buttons of the bar), and F3 / Shift+F3 to go from one occurrence to the next. - Caret and selection under control:
il_caret_lineandil_caret_columnare read live and can be written (the "go to line" of a compilation error),of_select_range,of_selected_text,of_line_count. ib_modified:trueas soon as the text differs from the one declared saved, back tofalseif the user undoes back to it — enough to enable a Save button.- Gutter markers:
of_add_marker(line, MARKER_ERROR | MARKER_WARNING | MARKER_INFO, tooltip),of_remove_marker,of_clear_markers,of_marker_count— what a compiler says, where it says it. - Highlighting: HTML entities (
&), YAML blocks (|,>), JavaScript regular expressions, C# verbatim strings (@"…"), nested PowerScript comments and hyphenated identifiers. - Accessibility: code area and search bar buttons named in the application language, fold markers reachable from the keyboard (Tab, then Enter or Space).
- With
ib_foldingand no line numbers (ib_line_numbers = false), a narrow gutter keeps the fold markers.
Fixed #
- In folded mode, Enter and Tab no longer modify the text; Enter, Tab and Shift+Tab no longer clear the undo history: every keystroke is undone by Ctrl+Z.
- The search brings the found occurrence into view, starts from the caret and does not move it while the bar is open (Esc puts it on the current occurrence); it is recomputed when folding and unfolding; its counter is readable in dark themes.
ue_find_resultis raised once per search or per step (while typing only when the count changes), never when the bar closes;ue_caret_changedis also raised while typing, and in folded mode gives the line of the gutter.- A new
is_textis displayed from its first line. - The band of
il_doc_lineand the band of the current line (ib_current_line) cover the whole line with word wrap (ib_wrap); the gutter follows a change of font or tab size, and stays aligned at the end of the file with a horizontal scroll bar. - "Replace all" is instantaneous on a long text.
- Indentation: Shift+Tab unindents the right lines, the column counts a tab up to its stop, Enter indents by
ii_tab_size. - Input through an input method (IME, Asian languages) is no longer interrupted by Enter or Tab.
- Folding then unfolding a text without a closed region keeps the undo history.
- The caret comes back into the editor when a window of the library (command palette) closes.
- Highlighting is readable in dark themes; the dark palette follows the application theme.
- A file drop (
ib_allow_drop) raisesue_drop_filesalone (no moreue_drag_leavebefore it), with full paths beyond 260 characters;of_resetremoves the drop target (ib_allow_dropback tofalse). - Reading back a long text value takes time proportional to its size and returns it whole (it slowed down with the size and was cut beyond a million characters).
- Enter or Esc pressed in the component, when it does not use them, goes back to the window: the PowerBuilder
DefaultorCancelCommandButtonfires (the key was lost). - A language set by
PBT_SetLanguageapplies from the very next order given to the component: a text of an event raised by that order no longer comes in the old language. - With no language chosen by the application, the component announces English to screen readers (it announced French).
is_theme_style,is_theme_modeandil_theme_accentread back the style and mode shown and the component's own accent (-1when it has none); an unknown or badly written value is ignored instead of leaving the component without a theme, and an axis left empty follows the application's theme.- The application accent (
PBT_SetDefaultThemeAccent) survives a change of theme, is followed as long as the component has no accent of its own, and repaints everything derived from it (hover, pressed, selections); Windows high contrast is supported.
Behavior changes #
See the "Migrating from 3.0 to 4.0" guide, sections 11.3 and 11.28.
ii_doc_linebecomesil_doc_line(along): rename it. Setting the line brings it to the middle of the view and opens the folded region that hides it, without touching the caret; a line beyond the text marks nothing.is_textreads back with the line endings it received (CRLF, or CR alone), folded or not; a text that mixes them reads back in CRLF.is_syntaxreads back as written (SYNTAX_CSHARP,SYNTAX_XML…), no longer as the grammar used.#regionopenis no longer rewritten as#regionin your text.of_insert_textreturns-4when read-only or folded (nothing is inserted); during a search, it inserts at the user's caret, undoable with Ctrl+Z.of_findreturns-4whenib_search_enabledisfalse;of_find("")clears the field and the highlights.- A caret change requested by your code (
il_caret_line,of_select_range…) raisesue_caret_changedlike a gesture, withib_track_caret.
3.0 — September 2026 #
New #
of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).
Fixed #
- The line numbers of the gutter are readable in every theme.
ii_doc_linereads back the line that was set (0= none), instead of an internal index off by one (-1= none).
2.0 — September 2026 #
New #
ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.
Fixed #
- Folding (
ib_folding) is a reading mode: the text read back after folding was the old one, and unfolding overwrote what had just been typed. While the editor is folded it no longer takes keystrokes, andof_get_text()always returns the whole source; a refusedof_insert_textsays so throughue_script_error. - With
ib_track_caret, a click or a drag that moves the caret raisesue_caret_changed.
Behavior changes #
See the "Migrating from 1.0 to 2.0" guide.
ue_changedno longer carries the text:event ue_changed ( ). Read the code withis_textorof_get_text().
1.0 — August 2026 #
New #
- Highlighting of ten language families (
is_syntax: PowerScript, SQL, JavaScript, JSON, C family, HTML / XML, CSS, Python, YAML, Markdown), line numbers, current line highlight, word wrap, tab size, font. - Folding of
#regionblocks (ib_folding), band on a designated line (ii_doc_line), read-only mode. - Built-in search (Ctrl+F,
of_find,ue_find_result), insertion at the caret (of_insert_text), caret tracking (ue_caret_changed), file drop from the Explorer (ue_drop_files).