summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
AgeCommit message (Collapse)Author
44 hourswipmaxim nikonov
45 hourswipmaxim nikonov
3 dayswipmaxim nikonov
6 daysFix compiler warning, rename confusing variable, format codeAlbrecht Schlosser
- fix: comparison of integer expressions of different signedness - rename confusing variable 'l' to 'len' (l can be confused with 1) - minor comment and code formatting This commit should not change the behavior.
7 daysImprove documentation of functions dedicated to processing of emoji sequences.ManoloFLTK
9 daysFix in Fl_Text_Buffer::next_char() necessary for empty buffer.ManoloFLTK
9 daysEmoji support: fix in Fl_Text_Buffer::next_char() necessary for keycap emoji ↵ManoloFLTK
sequences.
10 daysEmojis: add support of keycap emoji sequences.ManoloFLTK
- It is expected that all emojis listed in the Wikipedia "emoji" article as of early 2026 are recognized as single glyphs by FLTK text widgets. - Document functions fl_utf8_{next|previous}_composed_char() relatively to the notion of "emoji sequence". - Remove signed/unsigned comparison compilation warnings.
13 daysLet text widgets handle gracefully composed unicode characters - Cont'd.ManoloFLTK
This commit adds support of another type of composed characters: flags. It also fixes Fl_Text_Buffer::prev_char() and Fl_Text_Buffer::next_char() that must use Fl_Text_Buffer::byte_at() to access to the content of the text buffer.
2026-01-24Let Fl_Text_Editor and Fl_Input handle gracefully composed unicode characters.ManoloFLTK
2025-11-29Fluid: convert modal panels into tabs in the widget panel (#1339)Matthias Melcher
2024-08-04Optimize Fl_Text_Display scrolling speed (#596).Matthias Melcher
2023-12-01Adds some possible NULL references and small fixesMatthias Melcher
2023-11-15Remove mention of Fl_Simple_TerminalAlbrecht Schlosser
2023-05-19 Fix Fl_Simple_Terminal::append(str, len) assumes a null terminated string ↵ManoloFLTK
(#728)
2023-04-17Add const qualifiers to can_undo and can_redo (#720)ZJUGKC
2023-04-14Fixed leak in Fl_Text_Buffer #716Matthias Melcher
2023-02-27Fix malloc/delete mismatchMatthias Melcher
2023-02-10Infinite undo: fix compiler warningMatthias Melcher
2023-02-10Unlimited undo/redo for Fl_Input_ and Fl_Text_Buffer (#558) (#676)Matthias Melcher
2023-02-02Fix position() methods that shadow Fl_Widget::position()Matthias Melcher
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2022-11-26Local undo per Fl_Text_Buffer and Fl_Input_ (#557)Matthias Melcher
2022-01-16Rename FL/fl_string.h to FL/fl_string_functions.hAlbrecht Schlosser
This is part 1 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).
2020-08-01Implement + deploy fl_strdup()Greg Ercolano
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-05-15Fix "misleading indentation" in Fl_Text_Buffer.cxxNewton
Compiling with clang produced the following warning on this line: src/Fl_Text_Buffer.cxx:1292:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] replace(start, end, text); ^ src/Fl_Text_Buffer.cxx:1288:3: note: previous statement is here if (!sel->position(&start, &end)) ^
2018-12-27Fixing some minor lint, found by Pavel Shlyak using PVS studioMatthias Melcher
2017-10-08Added printf() and vprintf() to Fl_Text_BufferGreg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26Fix confusing behavior of class Fl_Text_Selection.Albrecht Schlosser
Fl_Text_Selection got a new method length() and returns 0 in length() and in all offsets (start(), end(), position()) if no text is selected (selected() == false). The behavior in FLTK 1.3 and earlier versions (returning undefined values if !selected()) was confusing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-17Handle non-ASCII characters when selecting a word or moving the cursor by ↵Manolo Gouy
one word. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-05Fl_Text_Buffer constructor: fix "requestedSize ignored in mGapEnd".Albrecht Schlosser
mGapEnd should reflect the total allocated size after the constructor is executed, i.e. the text buffer is empty. This was not the case. See thread "Fl_Text_Buffer constructor bug" (2016-12-05) in fltk.general. The bug was harmless, but the pre-allocation did not work as expected, i.e. the pre-allocated buffer size was allocated but effectively ignored later. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-09Fix typos.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-25Fix potential memory leak in text buffer (STR # 3035).Albrecht Schlosser
Also small code formatting, remove one redundant statement. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10083 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21STR2783: make potential null string substituted to an empty string, still ↵Fabien Costantini
achieve internal cleanup in Fl_Text_Buffer::text(s) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05Fixed build error in msvs because Fl ref to FULLSCREEN enum was not ↵Fabien Costantini
accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-02Minor comment rewordingManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-01Docs + cosmetics only.Greg Ercolano
> Added docs to utf8_input_filter() function > Documented its variables > Added comments to its code so it can be better understood in the future. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-01Fix STR#2808: corruption bug with Fl_Text_Buffer::insertfile().Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-15Homogenize use of re-encoding and transcoding (in favor of the latter).Manolo Gouy
Also, makes clear that the code is ready to deal with any encoding, not just fixed-length ones. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-15Removed compilation warning.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-10Fix STR #2348. Files encoded with UTF-8 or CP1252 are accepted. Any ↵Manolo Gouy
non-UTF-8-encoded data is interpreted according to CP1252 and transcoded to UTF-8. By default, a warning message is displayed when the input file was transcoded. This default behavior can be modified by changing a function pointer. A flag has been added to the Fl_Text_Buffer object that informs the caller if the input file was transcoded to UTF-8. The Fl_Text_Buffer.cxx file contains some preliminary code that could be used in the future to input other encodings provided they are fixed-length (e.g., all ISO-8859-* character sets, UTF-16). This code is not compiled at this point. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8004 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-08Fixed Windows text file line endings, as discussed in STR 2348 andAlbrecht Schlosser
fltk.development. Side effect: All Windows text files written are in Windows, aka DOS format (with CR/LF line endings), no matter what format they had when read. This is compatible with FLTK 1.1. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7979 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-07Restoring the non-binary read for MSWindows files. Still, I think this is ↵Matthias Melcher
harmful because now we read in ASCII and write in binary format... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-06Ooops, Fl_Text_Buffer::insertfile must read in binary format, or it will ↵Matthias Melcher
screw up line endings! (Actually, this could be debated, but by reading and writing in binary format, the file integrity would remain) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-06Fixed case when reading empty fileMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7967 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-06Fixed Fl_Text_Editor::insert_file to load all text in a single chung to ↵Matthias Melcher
avoid UTF8 confusion and missmatched gaps. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7966 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-06Fixed crashes when Fl_Text_* detects illegal UTF 8 sequences. Widgets will ↵Matthias Melcher
not do any further processing but just jump over the character. Screen representation depends largely on whatever the underlying OS does with those sequences, but I feel that this is out of the scope of this library. (STR 2348) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-02Fixed Doxygen comments, typos, and a few indenting issues.Albrecht Schlosser
Part 1, more to come ... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121