on master help sign in
-
05b2700Corey O'Connor
src/Graphics/Vty/Debug.hs−1
@@ -7,7 +7,6 @@ where
7
7
8import Graphics.Vty.Attributes
8import Graphics.Vty.Attributes
9import Graphics.Vty.Debug.Image
9import Graphics.Vty.Debug.Image
10−import Graphics.Vty.Picture
11import Graphics.Vty.Span
10import Graphics.Vty.Span
12import Graphics.Vty.DisplayRegion
11import Graphics.Vty.DisplayRegion
13
12
src/Graphics/Vty/Span.hs+4−2
@@ -230,14 +230,16 @@ snoc_text_span a text_str mrow_ops skip_col y remaining_columns = do
230 then if ow' == remaining_columns
230 then if ow' == remaining_columns
231 then ( ow', dw', char_count', b0 )
231 then ( ow', dw', char_count', b0 )
232 else if (w + ow') > remaining_columns
232 else if (w + ow') > remaining_columns
233− then ( remaining_columns, dw', char_count' + ooverflow, B.append b0 $ B.pack $ encode $ genericReplicate ooverflow '…' )
233+ then ( remaining_columns, dw', char_count' + ooverflow, B.append b0 oelipses )
234 else ( ow' + w, dw', char_count' + 1, B.append b0 $ B.pack $ encode [c] )
234 else ( ow' + w, dw', char_count' + 1, B.append b0 $ B.pack $ encode [c] )
235 else if (w + dw') > skip_col
235 else if (w + dw') > skip_col
236− then ( doverflow, skip_col, doverflow, B.append b0 $ B.pack $ encode $ genericReplicate doverflow '…' )
236+ then ( doverflow, skip_col, doverflow, B.append b0 delipses )
237 else ( ow', w + dw', char_count', b0 )
237 else ( ow', w + dw', char_count', b0 )
238 where
238 where
239 doverflow = skip_col - dw'
239 doverflow = skip_col - dw'
240+ delipses = B.pack $ encode $ genericReplicate doverflow '…'
240 ooverflow = remaining_columns - ow'
241 ooverflow = remaining_columns - ow'
242+ oelipses = B.pack $ encode $ genericReplicate ooverflow '…'
241
243
242snoc_bg_fill :: MRowOps s -> Background -> Word -> Word -> ST s ()
244snoc_bg_fill :: MRowOps s -> Background -> Word -> Word -> ST s ()
243snoc_bg_fill _row_ops _bg 0 _row
245snoc_bg_fill _row_ops _bg 0 _row
test/Makefile+2−1
@@ -35,7 +35,8 @@ GHC_ARGS=--make -i../src \
35 -package QuickCheck-2.4 \
35 -package QuickCheck-2.4 \
36 -ignore-package vty \
36 -ignore-package vty \
37 ../cbits/gwinsz.c ../cbits/set_term_timing.c ../cbits/mk_wcwidth.c \
37 ../cbits/gwinsz.c ../cbits/set_term_timing.c ../cbits/mk_wcwidth.c \
38− -O -funbox-strict-fields -Wall -threaded -fno-full-laziness -fspec-constr -rtsopts \
38+ -O -funbox-strict-fields -Wall -threaded -fno-full-laziness -fspec-constr -fspec-constr-count=10 \
39+ -rtsopts \
39 -odir objects -hidir objects
40 -odir objects -hidir objects
40
41
41GHC_PROF_ARGS=-prof -auto-all $(GHC_ARGS)
42GHC_PROF_ARGS=-prof -auto-all $(GHC_ARGS)
test/Verify/Data/Terminfo/Parse.hs+1−1
@@ -111,7 +111,7 @@ verify_bytes_equal :: [Word8] -> [Word8] -> Result
111verify_bytes_equal out_bytes expected_bytes
111verify_bytes_equal out_bytes expected_bytes
112 = if out_bytes == expected_bytes
112 = if out_bytes == expected_bytes
113 then succeeded
113 then succeeded
114− else failed $ result
114+ else failed
115 { reason = "out_bytes ["
115 { reason = "out_bytes ["
116 ++ hex_dump out_bytes
116 ++ hex_dump out_bytes
117 ++ "] /= expected_bytes ["
117 ++ "] /= expected_bytes ["
test/verify_parse_terminfo_caps.hs+3−3
@@ -111,7 +111,7 @@ main = do
111verify_parse_cap cap_string on_parse = liftIOResult $ do
111verify_parse_cap cap_string on_parse = liftIOResult $ do
112 parse_result <- parse_cap_expression cap_string
112 parse_result <- parse_cap_expression cap_string
113 case parse_result of
113 case parse_result of
114− Left error -> return $ failed $ result { reason = "parse error " ++ show error }
114+ Left error -> return $ failed { reason = "parse error " ++ show error }
115 Right e -> on_parse e
115 Right e -> on_parse e
116
116
117non_paramaterized_caps (NonParamCapString cap) = do
117non_paramaterized_caps (NonParamCapString cap) = do
@@ -140,7 +140,7 @@ push_param_caps (PushParamCap cap_string expected_param_count expected_bytes) =
140 out_param_count = param_count e
140 out_param_count = param_count e
141 in return $ if out_param_count == expected_param_count
141 in return $ if out_param_count == expected_param_count
142 then verify_bytes_equal out_bytes expected_bytes
142 then verify_bytes_equal out_bytes expected_bytes
143− else failed $ result { reason = "out param count /= expected param count" }
143+ else failed { reason = "out param count /= expected param count" }
144
144
145dec_print_param_caps (DecPrintCap cap_string expected_param_count expected_bytes) = do
145dec_print_param_caps (DecPrintCap cap_string expected_param_count expected_bytes) = do
146 verify_parse_cap cap_string $ \e ->
146 verify_parse_cap cap_string $ \e ->
@@ -149,7 +149,7 @@ dec_print_param_caps (DecPrintCap cap_string expected_param_count expected_bytes
149 out_param_count = param_count e
149 out_param_count = param_count e
150 in return $ if out_param_count == expected_param_count
150 in return $ if out_param_count == expected_param_count
151 then verify_bytes_equal out_bytes expected_bytes
151 then verify_bytes_equal out_bytes expected_bytes
152− else failed $ result { reason = "out param count /= expected param count" }
152+ else failed { reason = "out param count /= expected param count" }
153
153
154print_cap ti cap_name = do
154print_cap ti cap_name = do
155 putStrLn $ cap_name ++ ": " ++ show (from_capname ti cap_name)
155 putStrLn $ cap_name ++ ": " ++ show (from_capname ti cap_name)