6 * The Input type got a new field, 'restoreInputState'. This field
7 allows the end user to have direct access to the logic needed to
8 restore the terminal's input state flags. Prior to having this field,
9 this state restoration logic could only be invoked as part of calling
10 'shutdownInput', but since that function does other things (like
11 killing threads) it is not advisable to call it repeatedly (which is
12 necessary in the use case this change is intended to support). This
13 can be called directly to restore the input state flags as needed,
14 although this is not required if 'shutdown' (or 'shutdownInput') is
18 * attributeControl: explicitly enable the ICRNL terminal mode flag (see
25 * Added a package dependency on `semigroups` for the
26 `vty-build-width-table` tool on older GHCs (#185)
32 * `installUnicodeWidthTable`: use `throwIO`, not `throw`
37This release improves Vty's support for multi-column Unicode characters
38and provides greater compatibility with a wider array of terminal
39emulators. The following sections summarize the relevant changes, but an
40overview of the new functionality is motivated and detailed in the new
41"Multi-Column Character Support" README section. For
42historical context, please also consider reading over
43[#175](https://github.com/jtdaugherty/vty/issues/175).
46 * New modules were added:
47 * `Graphics.Vty.UnicodeWidthTable.Types`
48 * `Graphics.Vty.UnicodeWidthTable.IO`
49 * `Graphics.Vty.UnicodeWidthTable.Query`
50 * `Graphics.Vty.UnicodeWidthTable.Install`
51 * The `Config` type got a new field, `allowCustomUnicodeWidthTables`,
52 that controls whether `mkVty` will attempt to load a Unicode width
53 table if specified in the configuration.
55Configuration file changes:
56 * A new syntax was added to support specifying Unicode width tables on
57 a per-`TERM` basis. The syntax is `widthMap <TERM> <PATH>`. See the
58 documentation for `Graphics.Vty.Config` for details. Since prior
59 versions of this library will silently ignore any configuration file
60 lines they cannot parse, this change to user configuration files is
61 at least non-breaking for older versions of Vty.
64 * The `mkVty` function now automatically attempts to load a custom
65 Unicode width table if one is specified in the configuration,
66 provided `allowCustomUnicodeWidthTables` is not set to `Just False`.
67 See the documentation for `Graphics.Vty.mkVty` for details.
68 * Vty now includes a command line tool, `vty-build-width-table`, that
69 queries the terminal emulator to construct a custom Unicode width
70 table and optionally update the Vty configuration file to use it.
71 Programs that want to use that tool's functionality may also do so
72 via the API exposed in the various modules listed above.
77* Added `Graphics.Vty.Config.getTtyEraseChar` to support querying the
78 kernel for the current terminal's settings to obtain the character
79 assigned by the `stty erase` command. That can then be added to the
80 Vty configuration's input map to map to `KBS` (backspace) if desired.
85* Resolved various import warnings (thanks @glguy)
86* Removed the `MonadIO` constraint from the Output type's fields and
87 removed `MonadFail` uses (PR #177, thanks @glguy)
88* Clarified documentation for ANSI colors (thanks Colby Jenn)
89* `Graphics.Vty.Attributes` no longer re-exports
90 `Graphics.Vty.Attributes.Color`
91* The `Graphics.Vty.Attributes.Color` module is now exposed (thanks
93* Raised upper bound for `microlens` to 0.4.12 (thanks Artyom Kazak)
94* Changed from using `System.Posix.Env.getEnv` to
95 `System.Environment.lookupEnv` (thanks Jonathan Osser)
96* Added `Graphics.Vty.Image` functions for dealing with character width
97 computations on `Text` values instead of `Strings`:
106* Avoided a conflict with a Microlens 0.4.10 operator and added an
107 upper bound on Microlens of 0.4.11.
112* The Vty type got a new field, isShutdown, that returns whether the
113 Vty handle has had its 'shutdown' function called (thanks Ian
115* Vty's shutdown function is now thread-safe.
120* The "shutdown" method of Vty handles is now idempotent (#159)
125* Add Generic and NFData instances for some types
126* Image: remove custom Show instance, add derived Show and Read
128* Updated Travis build settings (thanks Eric Mertens)
133* Fixed a bug where italics did not combine properly with other display
134 modes (#155, thanks Eric Mertens)
139* Added support for italicized output when terminfo supports it. This
140 takes the form of a new Style, "italic". Note that most terminfo
141 descriptors do not report capabilities for italics, so support for
142 this will be very spotty.
143* Updateed text/string function documentation to indicate that escapes
144 are not permitted in their inputs.
149* Added Graphics.Vty.Attributes.Color240.color240CodeToRGB function
150 (thanks Brent Carmer)
151* Added nextEventNonblocking function (field) to Vty type (#87)
156* Picture and Background now provide Eq instances (thanks Jaro Reinders)
157* #145: vty builds with microlens 0.4.9 (thanks Daniel Wagner)
158* #142: note requirement of threaded RTS
164* Split up Monoid instances into Monoid and Semigroup for newer GHCs
171* Cursor now provides an Eq instance (thanks Jaro Reinders)
177* URL hyperlinking (via 'withURL') is now optional and disabled by
178 default due to poor support on some common terminals. A new 'Mode'
179 constructor, 'Hyperlink', has been added to enable this feature. To
180 change the hyperlinking mode, use 'setMode' on the 'outputIface' of a
187* Reset the hyperlink state on line endings to avoid run-on hyperlinks
193* Added support for hyperlinking attributes (thanks Getty Ritter). This
194 change adds a new Attr field for containing the hyperlink to apply,
195 as per https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
200* withStyle now ignores zero arguments, leaving attribute styles
201 untouched if the input style is the null style
207* Add support for terminal focus events. This change adds a new mode
208 usable with setMode, Focus, that requests that the terminal send
209 events on focus lose/gain. This change also adds two new Event
210 constructors, EvLostFocus and EvGainedFocus.
211* No longer enable UTF8 mouse event encoding. This encoding was not
212 working properly with Terminal.app, and using the other modes (SGR,
214* Graphics.Vty.Attributes: escape backticks in Haddock comment (fixes
221* Added support for mouse wheel events while in mouse mode. The Button
222 type got two new constructors as a result: BScrollUp and BScrollDown.
223 Thanks to doublescale@tutanota.com for this contribution!
226* charFill now clamps negative arguments to zero (thanks Eric Mertens!)
232* Documentation files are now marked accordingly (thanks Michal
236* translateX/Y: fix negative translations
242* Discontinued support for GHC versions prior to 7.10.1.
243* Removed instructions and configuration for Stack builds since they
244 are no longer supported.
245* Clarified README mention of (lack of) Windows support (contributors
247* Removed dependency on data-default (see below).
250* Moved color definitions from Attributes to Color module.
251* In lieu of data-default (Default) instances for Attr and Config, use
252 'defAttr' and the new 'defaultConfig' (or 'mempty') instead of 'def'.
253* Graphics.Vty.Output no longer re-exports
254 Graphics.Vty.Output.Interface.
255* Removed Graphics.Vty.Prelude module and moved DisplayRegion and its
256 accessors to Graphics.Vty.Image.
257* Graphics.Vty.Image no longer re-exports Graphics.Vty.Attributes.
258* Graphics.Vty.Picture no longer re-exports Graphics.Vty.Image.
263* addMaybeClippedJoin: instead of raising an exception when the join
264 is totally clipped, just reduce the clip amount and continue
265* addMaybeClipped: skip blit of joins when their primary dimension is
267* 'string' and related text functions no longer treat an empty string
268 as an empty image (thanks Chris Penner). This means that now it is
269 possible to use 'str ""' as a non-empty image with height 1.
274* Reverted changes in 5.12 due to disagreements between terminal
275 emulators and utf8proc; for more details, please see the ticket
277 https://github.com/coreyoconnor/vty/issues/115
282* Replaced 'wcwidth' with a call to the utf8proc library's character
283 width function, which is much more up to date (by several Unicode
284 versions) and returns the right width for a much larger set of
286* Added a bundled version of the utf8proc C library.
291* Fix mouse event offsets in mouse-up events
296* Mouse events were modified so that the upper-left corner of the window
297 is (0,0) rather than (1,1).
302* Add Generic instance for Image
303* nextEvent: stop trying to refresh on a resize event (fixes segfault
304 on refresh with normal cursor positioning mode)
305* Remove redundant clause from clipForCharWidth (thanks Eric Mertens)
311* Vty now raises a VtyConfigurationError exception when the TERM
312 evironment variable is missing (thanks Eric Mertens)
313* Graphics.Vty.Config got an explicit export list to avoid accidentally
314 exporting internal types (thanks Eric Mertens)
319* Add absolute cursor positioning mode AbsoluteCursor to Cursor. This
320 mode provides greater control over cursor positioning by bypassing
321 the logical positioning provided by default. Rather than positioning
322 the cursor by looking at the widths of characters involved, this
323 constructor lets you provide a physical row and column instead. This
324 is useful in more sophisticated programs. (thanks Eric Mertens)
325* Added a new Generic-derived config parser (thanks Eric Mertens)
326* Fixed the MShift case in the configuration file parser (thanks Eric
328* Fixed wcwidth import and matched safeWcswidth to its documented
329 behavior. Previously vty_mk_wcwidth was being imported with the
330 wrong type causing the -1 return value to be mapped to the wrong Int
331 value. Additionally safeWcswidth was using the unsafe character width
332 function and only ensuring that the final result was non-negative.
333 (thanks Eric Mertens)
338* Vty now only emits UTF8 charset sequences in terminals without a
339 preexisting UTF8 declaration to avoid emitting garbage sequences
345* Added new Output methods supportsBell and ringTerminalBell to find out
346 whether the output device has an audio bell and to ring it (see #102)
351* Fixed "refresh" to work as advertised (see #104)
356* API change: EvPaste input event now provides paste data as a raw
357 ByteString rather than a String to allow the application to decode how
363* ModeDemo: added an explicit Control.Applicative import for older GHCs
368* Mouse and paste modes are now off by default.
369* The Config type got new fields: mouseMode and bracketedPasteMode.
370 These determine whether these modes are enabled initially (for
371 terminals that support them).
372* Added a Mode type for modal terminal features (mouse events,
373 bracketed paste mode) that is used with new Output interface
375 * supportsMode :: Mode -> Bool tells whether the device supports a
377 * setMode :: Mode -> Bool -> IO () turns a mode on or off
378 * getModeStatus :: Mode -> IO Bool tells you whether a mode is on or
380* Added a new demo program, ModeDemo.hs, to demonstrate usage of modes
385* Added support for normal and extended mouse modes in Xterm-like
386 terminals via the MouseDown and MouseUp Event constructors
387* Added support for bracketed paste mode in Xterm-like terminals via
388 the EvPaste event constructor
389* Added derived Show instances for Event and Button (thanks Felix
391* Now TERM values containing "screen" will automatically use the
392 XtermColor driver rather than just TerminfoBased
397* Replaced lens dependency with microlens, microlens-mtl, microlens-th
398 dependencies. Issue #90
399 * Thanks Jonathan Daugherty
401 * Thanks Lennart Spitzner
406* Changed eventChannel of Graphics.Vty.Input from Chan to
407 TChan. This enables clients to query if there are no pending
408 events. The Graphics.Vty interface nextEvent is unchanged.
409 Clients that use eventChannel directly will require updating.
410 https://github.com/coreyoconnor/vty/issues/60
415* Reverted cabal file to depend on Cabal >= 1.18 instead of 1.20 due to
416 possibly breaking this on reasonable GHC versions
421* Upgraded QuickCheck dependency to 2.7
422* The standard IO Config (standardIOConfig) was overriding any provided
423 application config. In addition, the inputFd and outputFd could not be
424 changed if mkVty was used. Fixed.
425* Correct handling of display attributes at end of line. The output
426 attributes are set to default at the end of content for the line and
427 at the start of a new line. Previously the current attribute would
428 extend to the next start of content. This was odd to reason about and
429 was the cause of https://github.com/coreyoconnor/vty/issues/76 IIRC Yi
430 requires the old behavior to display the selection region correctly.
431* shutdown of the input thread is now performed using killThread and
432 synchronization on an MVar. For correct handling of the terminal read
433 vmin and vtime the read must be a blocking read on an OS thread.
434 This places a threadWaitRead, which will be interrupted by the
435 killThread, prior to the uninterruptable read. An alternative would be
436 to re-import the read foreign call as interruptable.
441* deepseq bounds increased for tests.
442* Clean up warnings when compiling on 7.10
443 * Thanks Eric Mertens
444* Avoid discarding input bytes after multi-byte encoded codepoint
445 * Thanks Eric Mertens
450* "str" now returns EmptyImage for empty strings to match behavior of
451 other string-like Image constructors (fixes #74)
452 * Thanks Jonathan Daugherty
457* dependency version bumps
458 * https://github.com/coreyoconnor/vty/pull/71
459 * https://github.com/coreyoconnor/vty/pull/70
460* Correct/Simplify the example code
462 * https://github.com/coreyoconnor/vty/pull/69
467* blaze-builder, lens, utf8-string version constraint bump
469 * https://github.com/coreyoconnor/vty/pull/67
470* Do not differentiate based on TERM_PROGRAM
471 * https://github.com/coreyoconnor/vty/issues/68
476* lens and deepseq constraint bump + misc
478 * https://github.com/coreyoconnor/vty/pull/66
483* lens constraint bump
484 * Thanks alexander-b!
485 * https://github.com/coreyoconnor/vty/pull/64
490* lens and random version constraint bump.
491 * Thanks RyanGlScott!
492 * https://github.com/coreyoconnor/vty/pull/62
497* removed -fpic from cc-options. No longer required.
498 * https://github.com/coreyoconnor/vty/issues/61
499 * https://ghc.haskell.org/trac/ghc/ticket/9657
505* evaluate/compile the input parsing table once instead of each
507 * https://github.com/coreyoconnor/vty/pull/59
513* When looking at input for an event, don't look too deep.
514 * https://github.com/coreyoconnor/vty/pull/57
520* Bump upper version bound for lens to 4.5. Thanks markus1189!
525* Config structure now specifies file descriptor to use. The default
526 is stdInput and stdOutput file descriptors. Previously Vty used
527 stdInput for input and the follow code for output:
528 * hDuplicate stdout >>= handleToFd >>= (`hSetBuffering`
530 * the difference was required by Vty.Inline. Now, Vty.Inline uses
531 the Config structure options to acheive the same effect.
532* removed: derivedVtime, derivedVmin, inputForCurrentTerminal,
533 inputForNameAndIO, outputForCurrentTerminal, outputForNameAndIO
534* added: inputForConfig, outputForConfig
535* updates to vty-rogue from jtdaugherty. Thanks!
536* the oldest version of GHC tested to support vty is 7.6.2.
537* the oldest version of GHC that vty compiles under is 7.4.2
542* merged https://github.com/coreyoconnor/vty/pull/51 thanks trofi!
547* merged https://github.com/coreyoconnor/vty/pull/48 thanks sjmielke!
548* jtdaugherty resolved a number of compiler warnings. Thanks!
553* vmin and vtime can be specified however the application requires.
554 See Graphics.Vty.Config.
555* fixed the processing of input when vmin is set > 1.
560* The naming convention now matches:
561 * http://www.haskell.org/haskellwiki/Programming_guidelines#Naming_Conventions
562* all projects using vty for input must be compiled with -threaded.
563 Please notify vty author if this is not acceptable.
564* mkVtyEscDelay has been removed. Use "mkVty def". Which initialized
565 vty with the default configuration.
566* input handling changes
567 * KASCII is now KChar
568 * KPN5 is now KCenter
570 * Applications can add to the input tables by setting inputMap of
571 the Config. See Graphics.Vty.Config
572 * Users can define input table extensions that will apply to all vty
573 applications. See Graphics.Vty.Config
574 * terminal timing is now handled by selecting an appropriate VTIME.
575 Previously this was implemented within Vty itself. This reduced
576 complexity in vty but provides a different meta key behavior and
577 implies a requirement on -threaded.
578 * The time vty will wait to verify an ESC byte means a single ESC
579 key is the singleEscPeriod of the Input Config structure.
580* removed the typeclass based terminal and display context interface
581 in favor of a data structure of properties interface.
582* renamed the Terminal interface to Output
583* The default picture for an image now uses the "clear" background.
584 This background fills background spans with spaces or just ends the
586 * Previously the background defaulted to the space character. This
587 causes issues copying text from a text editor. The text would end
588 up with extra spaces at the end of the line.
590 * Each layer is an image.
591 * The layers for a picture are a list of images.
592 * The first image is the top-most layer. The images are ordered from
594 * The transparent areas for a layer are the backgroundFill areas.
595 backgroundFill is added to pad images when images of different
597 * If the background is clear there is no background layer.
598 * If there is a background character then the bottom layer is the
600 * emptyPicture is a Picture with no layers and no cursor
601 * addToTop and addToBottom add a layer to the top and bottom of the
603* compatibility improvements:
604 * terminfo based terminals with no cursor support are silently
605 accepted. The cursor visibility changes in the Picture will have
607 * alternate (setf/setb) color maps supported. Though colors beyond
608 the first 8 are just a guess.
609 * added "rgbColor" for easy support of RGB specified colors.
610 * Both applications and users can add to the mapping used to
611 translate from input bytes to events.
612* Additional information about input and output process can be
613 appended to a debug log
614 * Set environment variable VTY_DEBUG_LOG to path of debug log
615 * Or use "debugLog <path>" config directive
616 * Or set 'debugLog' property of the Config provided to mkVty.
617* examples moved to vty-examples package. See test directory for cabal
619 * vty-interactive-terminal-test
620 * interactive test. Useful for building a bug report for vty's
622 * test/interactive_terminal_test.hs
624 * view a input event log for vty. Example of interacting with
628 * The start of a rogue-like game. Example of layers and image
632 * benchmarks vty. A series of tests that push random pictures to
633 the terminal. The random pictures are generated using
634 QuickCheck. The same generators used in the automated tests.
641* Added Graphics.Vty.Image.crop: Ensure an image is no larger
642 than the specified size.
643* Added Graphics.Vty.Image.pad: Ensure an image is no smaller
644 than the specified size.
645* Added Graphics.Vty.Image.translate: Offset an image.
646* Thanks Ben Boeckel <MathStuf@gmail.com> for these features.
652* Attr record accessor fore_color changed to attr_fore_color
653* Attr record accessor back_color changed to attr_back_color
654* Attr record accessor style changed to attr_style
655* Added an "inline" display attribute changing DSL:
656 * put_attr_change applies a display attribute change
657 immediately to a terminal
658 * For instance, can be used to change the display attrbiutes
659 of text output via putStrLn and putStr. EX:
660 "put_attr_change $ back_color red" will set the background
662 * Changes do not apply to a Picture output via output_picture.
663 * See Graphics.Vty.Inline
664* Moved all IO actions into any monad an instance of MonadIO
669* binding for mk_wcswidth was incorrect. Most platforms just
670 magically worked due to coincidence.
676* "getSize" has been removed. Use "terminal vty >>= display_bounds"
677 where "vty" is an instance of the Vty data structure.
678* added a "terminal" field to the Vty data structure. Accesses the
679 TerminalHandle associated with the Vty instance.
680* Graphics.Vty.Types has undergone a number of changes. Summary:
681 * Partitioned into Graphics.Vty.Attributes for display attributes.
682 Graphics.Vty.Image for image combinators. Graphics.Vty.Picture
683 for final picture construction.
684* Graphics.Vty.Attributes:
685 * "setFG" and "setBG" are now "with_fore_color" and
687 * All other "set.." equations similarly replaced.
688 * "attr" is now "def_attr", short for "default display attributes"
689 Also added a "current_attr" for "currently applied display
692 * "horzcat" is now "horiz_cat"
693 * "vertcat" is now "vert_cat"
694 * "renderBS" is now "utf8_bytestring"
695 * "renderChar" is now "char"
696 * "renderFill" is now "char_fill"
697 * added a "utf8_string" and "string" (AKA "iso_10464_string") for
698 UTF-8 encoded Strings and ISO-10464 encoded Strings. String
699 literals in GHC have an ISO-10464 runtime representation.
700* Graphics.Vty.Picture:
701 * exports Graphics.Vty.Image
702 * "pic" is now "pic_for_image"
703 * added API for setting background fill pattern.
704* Completely rewritten output backend.
705 * Efficient, scanline style output span generator. Has not been
706 fully optimized, but good enough.
707 * The details required to display the desired picture on a
708 terminal are well encapsulated.
709 * Terminfo based display terminal implementation. With specialized
710 derivitives for xterm, Terminal.app, and iTerm.app.
711 * Attempts to robustly handle even terminals that don't
712 support all display attributes.
713 * I've tested the following terminals with success: iTerm.app,
714 Terminal.app, xterm, rxvt, mlterm, Eterm, gnome-terminal,
715 konsole, screen, linux vty. Hopefully you will be as
717 * Improved unicode support. Double wide characters will display as
719* 256 color support. See Graphics.Vty.Attributes.Color240. The actual
720 output color is adjusted according to the number of colors the
722* The Graphics.Vty.Image combinators no longer require matching
723 dimensions to arguments. Unspecified areas are filled in with a
724 user-customizable background pattern. See Graphics.Vty.Picture.
725* output images are always cropped to display size.
726* Significant code coverage by QuickCheck tests. An interactive test
727 for those final properties that couldn't be automatically verified.
730* "gnome terminal displays non-basic attributes as strikethrough"
731 * http://trac.haskell.org/vty/ticket/14
732* "Multi-byte characters are not displayed correctly on update"
733 * http://trac.haskell.org/vty/ticket/10
734* "Redraw does not handle rendering a line that extends beyond screen
736 * http://trac.haskell.org/vty/ticket/13
737* "The <|> and <-> combinators should be more forgiving of mismatched
739 * http://trac.haskell.org/vty/ticket/9
741 * http://trac.haskell.org/vty/ticket/19
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list