Jonathan Daugherty
00b0cbcfa9
gwinsz.h: fix vty_c_get_window_size prototype
2020-07-15 13:50:31 -07:00
Jonathan Daugherty
2fabd997b6
Whitespace
2020-07-15 13:50:23 -07:00
Jonathan Daugherty
6a9c90da0e
Output: add setDisplayBounds field and implementation for TerminfoBased backend
2020-07-15 13:49:05 -07:00
Jonathan Daugherty
5922c53459
Bump version, update changelog
2020-07-15 12:17:41 -07:00
Jonathan Daugherty
cb08446df4
Graphics.Vty: add setWindowTitle ( fixes #188 )
2020-07-15 10:42:29 -07:00
Jonathan Daugherty
95ea88c814
Bump version, update changelog
2020-07-09 15:17:22 -07:00
Jonathan Daugherty
a828f305d0
Merge branch 'bugfix/terminal-init-flags'
2020-07-09 15:05:20 -07:00
Jonathan Daugherty
812e873499
Input: add a new field, restoreInputState
...
This change adds a new record field to the Input type to allow the end
user to have direct access to the logic needed to restore the terminal's
input state flags. Prior to this change, this state restoration logic
could only be invoked as part of calling 'shutdownInput', but since that
function does other things (like killing threads) it is not advisable to
call it repeatedly (which is necessary in the use case this change is
intended to support).
This change supports a use case where an application initializes
Vty repeatedly, with changes to the input state flags in between
initializations, but where the application wants to ensure that the
*final* input state flag configuration matches the terminal's condition
before Vty started handling input for the first time. This change allows
applications to access the state restoration for the initial Vty handle
by exposing the logic directly in a field of Input.
The input state restoration is still an implicit part of invoking
'shutdownInput' (and thus 'shutdown') so no user-facing changes are
required for applications that do not build their own Input structures.
2020-07-09 15:01:45 -07:00
Jonathan Daugherty
e49ea78472
Whitespace
2020-07-09 14:14:17 -07:00
Jonathan Daugherty
be263d4893
Typo
2020-07-09 14:07:33 -07:00
Jonathan Daugherty
620a5ca544
attributeControl: document which constructors map to which terminal mode flags
2020-07-09 14:07:14 -07:00
Jonathan Daugherty
95cabe0b87
inputForConfig: move mode flag documentation to the right place and update it to include enabled flags
2020-07-09 14:05:45 -07:00
Jonathan Daugherty
c572ad1ac7
attributeControl: explicitly enable a required mode flag (see #187 )
...
Prior to this change, Vty would initialize the terminal by clearing the
flags it needed to clear. That is good, but it means that some flags
that were assumed to be enabled but not *explicitly* enabled by Vty
would cause trouble if they were not, in fact, enabled prior to Vty
initialization.
This comes up in (pathological?) cases where the terminal state prior to
Vty initialization is not what Vty assumes it will be, i.e., cases in
which some flags which are assumed to be set are not. We found this to
be true when an application (in this case vim) was terminated uncleanly,
leaving the terminal mode flags in a state that Vty did not anticipate.
To resolve this problem, this change explicitly sets one flag which we
now know to be required for Vty to function properly (the ICRNL flag).
2020-07-09 13:57:33 -07:00
Jonathan Daugherty
17e2560846
Clarify the meaning of "escapes" in some Haddocks ( fixes #186 )
2020-05-02 15:53:44 -07:00
Jonathan Daugherty
f7eef975de
Bump version, update changelog
2020-03-27 09:14:12 -07:00
Jonathan Daugherty
a0a32ec5fa
Depend on semigroups for older GHCs ( fixes #185 )
2020-03-27 09:12:48 -07:00
Jonathan Daugherty
92590dead1
Bump version, update changelog
2020-03-09 15:37:46 -07:00
Jonathan Daugherty
ab10b97e31
Graphics.Vty.UnicodeWidthTable.Install: use withMVar to avoid boilerplate
2020-03-09 13:49:11 -07:00
Jonathan Daugherty
0d2226cb1a
installUnicodeWidthTable: use throwIO, not throw
2020-03-09 13:45:05 -07:00
Jonathan Daugherty
9a9aeb65ea
Bump version, update changelog
2020-03-09 13:40:14 -07:00
Jonathan Daugherty
c97c03718d
Merge branch 'master' into feature/unicode-tables
2020-03-09 13:31:26 -07:00
Jonathan Daugherty
01e358b05f
Revert "Travis: disable shared libraries in test build to address test linking failures"
...
This reverts commit 7255d692fa
.
2020-03-09 12:54:57 -07:00
Jonathan Daugherty
7255d692fa
Travis: disable shared libraries in test build to address test linking failures
...
This change is an attempt to address failures like the one at
https://travis-ci.org/jtdaugherty/vty/jobs/660259959
that give rise to the "Prelude.read: no parse" errors. Although that may
not seem like the error one would expect, see these resources for
details on why I think this is the "fix" for this problem:
* https://stackoverflow.com/questions/39310043/getting-prelude-read-no-parse-error-when-using-detailed-0-9-tests-with-cabal
* https://github.com/haskell/cabal/pull/3527
2020-03-09 10:50:19 -07:00
Jonathan Daugherty
84e391f56a
UnicodeWidthTable.Install: clean up lock use
2020-03-09 10:24:57 -07:00
Jonathan Daugherty
5772d6aa57
UnicodeWidthTable.Install: make functions thread-safe with a global MVar
2020-03-09 10:20:28 -07:00
Jonathan Daugherty
a13f8fcb70
installUnicodeWidthTable: use custom exception type rather than calling "error"
2020-03-09 10:10:41 -07:00
Jonathan Daugherty
eabe52ba23
CHANGELOG: reformat
2020-03-06 11:04:46 -08:00
Jonathan Daugherty
18abb95ff4
BuildWidthTable: output nit
2020-03-06 10:20:48 -08:00
Jonathan Daugherty
261284cba7
BuildWidthTable: nits
2020-03-06 10:08:13 -08:00
Jonathan Daugherty
107be32423
BuildWidthTable: wait until the table is built before we create the output path
2020-03-06 09:35:33 -08:00
Jonathan Daugherty
b5b980c9e8
BuildWidthTable: cleanup
2020-03-06 09:34:55 -08:00
Jonathan Daugherty
63746c65e7
BuildWidthTable: add command-line flag to control which configuration file is updated
2020-03-06 09:33:57 -08:00
Jonathan Daugherty
c204e6dd21
BuildWidthTable: add command-line flag to update Vty config to use new map
2020-03-06 09:29:12 -08:00
Jonathan Daugherty
da8222347f
Graphics.Vty.Config: add addConfigWidthMap
2020-03-06 09:29:07 -08:00
Jonathan Daugherty
d8cdb981e1
BuildWidthTable: create Vty configuration parent directories if necessary
2020-03-06 09:18:54 -08:00
Jonathan Daugherty
8c24083402
buildUnicodeWidthTable: docs update
2020-03-05 14:47:56 -08:00
Jonathan Daugherty
eb1983d22d
UnicodeWidthTable.Query: make bound configurable, make command-line tool customize it
2020-03-05 14:45:41 -08:00
Jonathan Daugherty
aebf480d1d
buildUnicodeWidthTable: clarify exception handling
2020-03-05 14:38:40 -08:00
Jonathan Daugherty
2a76f765f4
UnicodeWidthTable.IO: expose bytestring parser
2020-03-05 14:37:46 -08:00
Jonathan Daugherty
69dfa280e9
cabal: remove ForeignFunctionInterface from default-extensions
2020-03-05 14:35:44 -08:00
Jonathan Daugherty
4e21a740e8
installUnicodeWidthTable: add a more obvious "do not use" comment
2020-03-05 14:33:20 -08:00
Jonathan Daugherty
5327c94b12
Graphics.Text.Width: add module docs
2020-03-05 14:31:38 -08:00
Jonathan Daugherty
3d8dbf6ffd
UnicodeWidthTable.Query: significantly raise testing upper bound
2020-03-05 14:27:41 -08:00
Jonathan Daugherty
4401f55526
buildUnicodeWidthTable: clarify usage intention
2020-03-05 14:21:16 -08:00
Jonathan Daugherty
2dbecaa9fe
UnicodeWidthTable.Types: update docs
2020-03-05 14:21:01 -08:00
Jonathan Daugherty
beef71e7b7
Table parsing: remove redundant explicit types in favor of explicit reader functions
2020-03-05 14:20:33 -08:00
Jonathan Daugherty
b54772ac1d
Migrate mkVty docs on table loading to Config
2020-03-05 14:20:14 -08:00
Jonathan Daugherty
e8e3fa3ba8
vty_deallocate_custom_table: also reset size
2020-03-05 14:19:53 -08:00
Jonathan Daugherty
0de76e531e
vty_custom_table_ready: simplify
2020-03-05 14:19:42 -08:00
Jonathan Daugherty
b988b6894e
vty_set_custom_table_range: avoid overflow in test
2020-03-05 14:19:28 -08:00