gemini-browser

A text-based gemini browser
git clone git://git.laack.co/gemini-browser.git
Log | Files | Refs | README

CHANGESv2.md (3423B)


      1 ## Breaking Changes in _Tcell_ v2
      2 
      3 A number of changes were made to _Tcell_ for version two, and some of these are breaking.
      4 
      5 ### Import Path
      6 
      7 The import path for tcell has changed to `github.com/gdamore/tcell/v2` to reflect a new major version.
      8 
      9 ### Style Is Not Numeric
     10 
     11 The type `Style` has changed to a structure, to allow us to add additional data such as flags for color setting,
     12 more attribute bits, and so forth.
     13 Applications that relied on this being a number will need to be updated to use the accessor methods.
     14 
     15 ### Mouse Event Changes
     16 
     17 The middle mouse button was reported as button 2 on Linux, but as button 3 on Windows,
     18 and the right mouse button was reported the reverse way.
     19 _Tcell_ now always reports the right mouse button as button 2, and the middle button as button 3.
     20 To help make this clearer, new symbols `ButtonPrimary`, `ButtonSecondary`, and
     21 `ButtonMiddle` are provided.
     22 (Note that which button is right vs. left may be impacted by user preferences.
     23 Usually the left button will be considered the Primary, and the right will be the Secondary.)
     24 Applications may need to adjust their handling of mouse buttons 2 and 3 accordingly.
     25 
     26 ### Terminals Removed
     27 
     28 A number of terminals have been removed.
     29 These are mostly ancient definitions unlikely to be used by anyone, such as `adm3a`.
     30 
     31 ### High Number Function Keys
     32 
     33 Historically terminfo reported function keys with modifiers set as a different
     34 function key altogether.  For example, Shift-F1 was reported as F13 on XTerm.
     35 _Tcell_ now prefers to report these using the base key (such as F1) with modifiers added.
     36 This works on XTerm and VTE based emulators, but some emulators may not support this.
     37 The new behavior more closely aligns with behavior on Windows platforms.
     38 
     39 ## New Features in _Tcell_ v2
     40 
     41 These features are not breaking, but are introduced in version 2.
     42 
     43 ### Improved Modifier Support
     44 
     45 For terminals that appear to behave like the venerable XTerm, _tcell_
     46 automatically adds modifier reporting for ALT, CTRL, SHIFT, and META keys
     47 when the terminal reports them.
     48 
     49 ### Better Support for Palettes (Themes)
     50 
     51 When using a color by its name or palette entry, _Tcell_ now tries to
     52 use that palette entry as is; this should avoid some inconsistency and respect
     53 terminal themes correctly.
     54 
     55 When true fidelity to RGB values is needed, the new `TrueColor()` API can be used
     56 to create a direct color, which bypasses the palette altogether.
     57 
     58 ### Automatic TrueColor Detection
     59 
     60 For some terminals, if the `Tc` or `RGB` properties are present in terminfo,
     61 _Tcell_ will automatically assume the terminal supports 24-bit color.
     62 
     63 ### ColorReset
     64 
     65 A new color value, `ColorReset` can be used on the foreground or background
     66 to reset the color the default used by the terminal.
     67 
     68 ### tmux Support
     69 
     70 _Tcell_ now has improved support for tmux, when the `$TERM` variable is set to "tmux".
     71 
     72 ### Strikethrough Support
     73 
     74 _Tcell_ has support for strikethrough when the terminal supports it, using the new `StrikeThrough()` API.
     75 
     76 ### Bracketed Paste Support
     77 
     78 _Tcell_ provides the long requested capability to discriminate paste event by using the
     79 bracketed-paste capability present in some terminals.  This is automatically available on
     80 terminals that support XTerm style mouse handling, but applications must opt-in to this
     81 by using the new `EnablePaste()` function.  A new `EventPaste` type of event will be
     82 delivered when starting and finishing a paste operation.