1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

178 Commits

Author SHA1 Message Date
Delyan Angelov
c6ff687e8a
term: do not put the unused c_line field in C.termios in declarations_linux.c.v (breaks BSD build) 2021-09-06 19:15:47 +03:00
Delyan Angelov
166dd61e90
Revert "Revert "term: obtain the cursor position via termios.h (#11372)""
This reverts commit 0376cbf6bd.
2021-09-06 19:04:14 +03:00
Alexander Medvednikov
0376cbf6bd Revert "term: obtain the cursor position via termios.h (#11372)"
This reverts commit af28d09630.
2021-09-06 18:21:55 +03:00
AAAA
af28d09630
term: obtain the cursor position via termios.h (#11372) 2021-09-06 17:24:39 +03:00
AAAA
289e77d51b
term: group related functions (#11371) 2021-09-04 19:49:47 +03:00
Delyan Angelov
46ede3fb98
v check-md: reduce false positives for too long lines in various cases (real problems are easier to spot now) 2021-08-16 10:12:29 +03:00
Delyan Angelov
34d39ccb64
builtin: fix leak in rune.str(), fix leaks in most assert x == y statements in tests (#11091) 2021-08-13 18:37:34 +03:00
wilesun
18be9e52be
log: avoid using string__plus memory leak (#11128) 2021-08-11 09:26:02 +03:00
Delyan Angelov
6134c4870b
v.util: extract v.util.version, use it to speed up building v repl, v up and v doctor 2021-07-27 12:59:56 +03:00
Delyan Angelov
027be2ecd4
tests: show a list of all failed commands in the summary too 2021-07-15 11:53:14 +03:00
Delyan Angelov
d56ae2d508
v.fmt: keep comments after struct embeds 2021-06-18 18:42:05 +03:00
Uwe Krüger
60c880a0cc
vlib: use malloc_noscan() where possible (#10465) 2021-06-15 14:47:11 +03:00
Delyan Angelov
00b3092a92
term: use textscanner.new in term.strip_ansi/1 2021-05-20 11:24:44 +03:00
Delyan Angelov
c8a9052a5f
term: add term.strip_ansi/1 (based on ansi2txt) and term.header_left/1 2021-05-20 10:15:37 +03:00
Delyan Angelov
453fb1b08b
term.ui: use os.signal_opt instead of os.signal 2021-05-18 11:59:57 +03:00
Delyan Angelov
8a380f4699
tools: make v test-cleancode test everything by default (#10050) 2021-05-08 13:32:29 +03:00
Uwe Krüger
3c0a368af3
all: automatically move (some) referenced objects to heap (#9873) 2021-04-25 21:40:38 +03:00
Alexander Medvednikov
0567cbe431 examples: fix compilation with -prod 2021-04-23 14:48:07 +03:00
crthpl
14434cc86a
all: bare metal support (fix -freestanding) (#9624) 2021-04-14 07:50:50 +02:00
Delyan Angelov
024787b01c
ci: make the compiler_errors_test.v output silent in the CI for the OK cases 2021-03-31 12:07:19 +03:00
Delyan Angelov
ae6420afc7
tools: fix substring in s usages, preventing v -W build-tools 2021-03-23 13:36:50 +02:00
Delyan Angelov
c76c69ec35
all: simplify return if ... constructs to make more code compatible with -autofree 2021-03-22 16:45:29 +02:00
Nick Treleaven
446631ceb5
checker: fixed array cannot implicitly convert to fooptr (again) (#9302) 2021-03-15 15:55:07 +02:00
Lukas Neubert
a67d49050c
math: add a pure V math.mathutil, with generic min, max and abs functions (#9176), and use it consistently 2021-03-12 11:28:04 +02:00
Delyan Angelov
d7049ae2da
os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974) 2021-03-08 20:52:13 +02:00
joe-conigliaro
2d73411396
checker: define missing C fn args & check C & JS args (#8770) 2021-03-05 17:41:11 +03:00
James Addison
a64d9b3e12
termui: add show_cursor() and hide_cursor() (#9087) 2021-03-04 12:31:26 +02:00
spaceface
b712af56fd
all: bring back panic(err.msg) -> panic(err) (#9022) 2021-03-01 00:18:14 +01:00
spaceface
d63b7bc35a
all: update repo to use the new error handling syntax (#8950) 2021-02-28 23:20:21 +03:00
Delyan Angelov
20f9bdfa8e
os: fixes for os.input(), os.get_raw_stdin(), os.get_raw_line() in case of stdin EOF 2021-02-27 20:02:36 +02:00
Alexander Medvednikov
3a2d696fac time: time.wait() => time.sleep() 2021-02-27 20:41:06 +03:00
Nick Treleaven
23f231ee61
builtin: tag array methods unsafe: *_many, grow_len, pointers (#8983) 2021-02-26 22:55:09 +01:00
Delyan Angelov
639061be6c
examples: fix left/right arrows in examples/term.ui/text_editor.v 2021-02-25 21:01:27 +02:00
Delyan Angelov
c37daba41d
ci: fix the remaining obsolete reference to time.sleep and time.usleep 2021-02-22 09:12:23 +02:00
zakuro
ac4791045f
time: consolidate the different sleep functions into time.wait(Duration) (#8853) 2021-02-21 17:05:03 +02:00
spaceface
260f677469
term.ui: use the new [flag] enums (#8881) 2021-02-21 16:07:49 +02:00
Delyan Angelov
bf6e9ff95a
Revert "parser: make duplicated functions an error (#8792)"
This reverts commit 21bf8fe14e.
2021-02-18 09:02:56 +02:00
zakuro
21bf8fe14e
parser: make duplicated functions an error (#8792) 2021-02-17 20:50:10 +01:00
Nick Treleaven
ea803113c3
checker: check unsafe V function calls (#8752) 2021-02-14 19:31:42 +01:00
Swastik Baranwal
6de78ecb59
term: implement term.clear() for windows (#8650) 2021-02-09 14:25:31 +02:00
Lukas Neubert
473cd1d416
fmt: single line ternary return (#8605) 2021-02-08 00:28:46 +01:00
Lukas Neubert
58b3a30b47
docs/readmes: format almost all remaining code blocks (#8590) 2021-02-05 19:50:28 +02:00
shadowninja55
fccd4f98d5
fixed offset (#8376) 2021-01-27 19:39:53 +02:00
spaceface
e233911a7b
term.ui: native Windows console implementation (#8359) 2021-01-27 13:52:39 +01:00
Delyan Angelov
dd96852515
ci: fix compilation of term.ui examples on windows 2021-01-26 19:26:05 +02:00
Delyan Angelov
e5a84719ca
all: require calling optfn() ? / optfn() or {...} for fn optfn() ? {} 2021-01-26 16:43:17 +02:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
Daniel Däschle
dbf84520f1
all: update assoc syntax (#8274) 2021-01-22 23:24:48 +01:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Delyan Angelov
3ee78dc961
term: add term.colorize/2, use it in the tests. Support ConEmuANSI = ON too. 2021-01-17 19:09:29 +02:00
yuyi
a2efb5319d
all: change [1,2,3]!! to [1,2,3]! (#8101) 2021-01-14 03:51:13 +01:00
Daniel Däschle
a22982d662
tests: colorize failing tests, improve layout (#8066) 2021-01-13 11:07:12 +02:00
yuyi
a1c67232d0
checker: fix duplicate variable name (fix #265) (#7982) 2021-01-10 21:41:29 +01:00
cbracketdash
0210d1bf24
vrepl, term: return cursor to the top-left corner in vrepl after clear (#7600) 2020-12-27 13:43:36 +02:00
Delyan Angelov
3064fff95b
vlib: prepare modules hash and term for -Wimpure-v 2020-12-15 09:11:17 +02:00
Nick Treleaven
63557d0d02
checker: disallow op= and infix on a voidptr (#7175) 2020-12-07 22:43:38 +02:00
Lukas Neubert
8adb1acf31
check-md: verify code example formatting (#7143) 2020-12-05 22:54:41 +01:00
Larpon
1192dfdc8a
term.ui: document functions (#6979) 2020-11-29 08:32:04 +02:00
Delyan Angelov
7cd9530006 docs: fix most of the examples (ensure they at least have a valid syntax) 2020-11-27 13:03:32 +02:00
spaceface777
6563535a3d
term.ui: simplify/fix the truecolor feature test (#6963) 2020-11-26 23:52:20 +01:00
spaceface777
e03ae19372
term.ui: approximate colors into ansi if rgb isn't supported (#6951) 2020-11-26 00:28:57 +01:00
Lukas Neubert
df4165c7ee
docs_ci: check all md files except thirdparty (#6855) 2020-11-18 18:28:28 +01:00
Larpon
fdc0cd4c03
term.ui: add dashed lines and rectangles (#6848) 2020-11-17 15:08:35 +01:00
spaceface777
ac8a2ff12d
term.ui: feature-detect the SU spec (#6844) 2020-11-16 14:48:08 +02:00
spaceface777
1ead130eed
term.ui: render to the alternate buffer (#6832) 2020-11-14 21:05:22 +02:00
Carlos Esquerdo Bernat
827fb62c29
examples/text_editor: edit multiple files (#6827) 2020-11-14 19:39:59 +02:00
spaceface777
6b47c61fe4
term.ui: handle middle mouse button events and modifier keys (#6821) 2020-11-14 09:14:54 +02:00
spaceface777
c315218ed1
term.ui: allow setting the terminal title (#6809) 2020-11-13 15:30:47 +02:00
Delyan Angelov
a3404a38c6 term_drawing.v: support arrows, 1, 2 and space 2020-11-13 13:08:28 +02:00
Delyan Angelov
f6e54dc027 term.ui: improve Ctrl-Z + fg handling 2020-11-13 10:27:53 +02:00
spaceface777
24f743ee12
term: add term.ui module (part 2) (#6798) 2020-11-12 12:12:51 +01:00
Delyan Angelov
f3732b730a term: replace assert with panic to enable build-module for it too 2020-10-21 08:49:07 +03:00
Alexander Medvednikov
7da1afa140 all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests 2020-10-15 12:32:28 +02:00
bpryer
3f7970db52
term: add get_cursor_position and set_terminal_title (#6279)
* added functions

added:
  - get_cursor_position()
  - set_terminal_title(title string)

* implement term.get_cursor_position and term.set_terminal_title on unix

* Cleanup

* make x,y fields of term.Coord mutable

* fix vrepl compilation

* use more descriptive var names in term_test.v

* do not change the current terminal title in dumb terminals; do not test term.set_terminal_title outside of CI

* unix: in term.set_terminal_title, return true even for dumb terminals

Co-authored-by: Brent Pryer <brent@pryermachine.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-09-08 22:00:10 +03:00
Irabaruta Freeman
fa11e124dd
term: add documentation (#6097) 2020-08-17 20:16:18 +02:00
Delyan Angelov
346cc5ca2c term: fix panic in term.header, when cols,rows from get_terminal_size are < 2 2020-07-24 08:34:39 +03:00
pancake
b7bdb97f7d
term: fix crash in header when divider.len < 2 (#5956) 2020-07-23 18:54:29 +02:00
Swastik Baranwal
72b09d4794
term: add clear 2020-06-19 17:15:41 +02:00
Alexander Medvednikov
ed58192e4c v orm: select 2020-06-17 00:59:37 +02:00
yuyi
dda875a9c8
all: unify const names to snake_case 2020-05-22 17:36:09 +02:00
Enzo Baldisserri
f44a40eee0
checker: check incorrect names 2020-05-16 16:12:23 +02:00
Delyan Angelov
4b347ff148 v self: force the subprocess to show colors 2020-05-08 19:04:24 +03:00
lutherwenxu
dc4db87be3
vlib: use new filename format 2020-04-11 19:51:32 +02:00
Delyan Angelov
e10290eb8e tests: make the SKIP and FAIL labels more distinctive 2020-04-08 18:42:05 +03:00
Daniel Däschle
a61654009f
tests: change skip color to yellow instead of red 2020-04-08 16:52:40 +02:00
Alexey
72df30050d
term: fix get_terminal_size on Windows 2020-04-04 11:56:43 +02:00
Alexander Medvednikov
1cfe44d9c6 fix windows build 2020-04-02 01:15:00 +02:00
Delyan Angelov
b62035e3d0
solaris & termux: fix both, using the more portable termios.h 2020-03-31 12:46:46 +02:00
Delyan Angelov
7785583b34
android: fix termux build 2020-03-29 20:54:21 +02:00
Major Taylor
5c9cbae10d
term: fix divide by 0 error on empty delimiter 2020-03-23 20:05:08 +01:00
Alexander Medvednikov
b4561fa814 Revert "term: make compilable with v2 on windows" 2020-03-20 21:15:45 +01:00
Alexander Medvednikov
0f1f724a91 term: make compilable with v2 on windows 2020-03-20 21:12:37 +01:00
Alexander Medvednikov
3dc3b11435 parser: $if blocks for headers 2020-03-19 07:59:01 +01:00
fantassin
5824d28a03
term: Solaris headers 2020-03-19 07:07:43 +01:00
joe-conigliaro
94537c5901
compiler: scope type alias to module 2020-02-09 15:40:31 +01:00
Alexander Medvednikov
ea9961a8fb fix term_windows.v 2020-02-07 23:16:34 +01:00
Don Alfons Nisnoni
36e636743b
term: header() 2020-02-07 18:46:20 +01:00
joe-conigliaro
7f709c3285
update copyright years 2020-02-03 05:00:36 +01:00
Alexey
5c598a3085
term: reorganize the module 2020-01-29 05:12:12 +01:00
Alexey
5c00851b44
term: implement get_terminal_size for Windows 2020-01-28 23:44:57 +01:00