mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
term.ui: approximate colors into ansi if rgb isn't supported (#6951)
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
// Copyright (c) 2020 Raúl Hernández. All rights reserved.
|
||||
// Use of this source code is governed by an MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
module ui
|
||||
|
||||
const (
|
||||
@ -28,12 +31,12 @@ pub fn (mut ctx Context) load_title() {
|
||||
print('\x1b[23;0t')
|
||||
}
|
||||
|
||||
pub fn (mut ctx Context) run() {
|
||||
pub fn (mut ctx Context) run() ? {
|
||||
if ctx.cfg.use_x11 {
|
||||
ctx.fail('error: x11 backend not implemented yet')
|
||||
exit(1)
|
||||
} else {
|
||||
ctx.termios_setup()
|
||||
ctx.termios_setup()?
|
||||
ctx.termios_loop()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user