Skip to content

Nocurses stuck #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonnieey opened this issue Mar 22, 2022 · 9 comments
Closed

Nocurses stuck #697

jonnieey opened this issue Mar 22, 2022 · 9 comments

Comments

@jonnieey
Copy link

sc-im ran with options --nocurses option get stuck if nocurses=0 is set in the configuration file.

@andmarti1424
Copy link
Owner

I believe you're overriding the nocurses=0 when you set it with --nocurses... It is also probably not stucked, but waiting for your commands. What are you trying to do btw?

@jonnieey
Copy link
Author

jonnieey commented Mar 23, 2022

Yeah, at first it go stuck (Like even QUIT didn't exit) but now its segmentation fault. I'm tring to learn how to use sc-im without curses and also create more sc-im tutorials

@jonnieey
Copy link
Author

2022-03-23-160040

@andmarti1424
Copy link
Owner

could you share your scimrc file and the file your loading (if there is one)? thanks.

@jonnieey
Copy link
Author

jonnieey commented Mar 23, 2022

I'm not opening any file but here's my config file.

CONFIG OPTIONS

set autobackup=60
set autocalc
set autowrap=0
set command_timeout=3000
set copy_to_clipboard_delimited_tab=0
set debug=0
set exec_lua
set external_functions=0
set half_page_scroll=1
set ignorecase
set input_bar_bottom
set mapping_timeout=1500
set newline_action=0
set nocurses=0
set numeric=0
set numeric_decimal
set numeric_zero
set overlap=0
set quiet=0
set quit_afterload=0
set show_cursor=0
set tm_gmtoff=10800
set truncate
set underline_grid=0
set xlsx_readformulas

MAPPINGS

nmap "Fy" ":int rebuild_graph"
nmap "Fc" ":unfreezecol"
nmap "Fr" ":unfreezerow"

cnoremap "<C-h>" ""
nnoremap "<RIGHT>" "fl"
nnoremap "<LEFT>" "fh"
nnoremap "<UP>" "fk"
nnoremap "<DOWN>" "fj"

INTERFACE

DEFINE_COLOR "grey" 125 125 125

color "type=HEADINGS fg=BLACK bg=BLUE"
color "type=HEADINGS_ODD fg=BLACK bg=BLUE"
color "type=NUMB fg=WHITE bg=BLACK"
color "type=STRG fg=MAGENTA bg=BLACK"
color "type=CELL_SELECTION_SC fg=BLACK bg=grey"
color "type=HELP_HIGHLIGHT bg=BLUE fg=BLACK"

@andmarti1424
Copy link
Owner

Yes. Thats the problem. The set nocurses=0 in the scimrc overrides (and collides) with the --nocurses passed as argv.
Your saying do not use ncurses interface and later you say "use it".

May be the solution would be to not allow setting that in the scimrc it if its already passed as argv..
Cause sc-im first get to know the argv parameters.. and then reads the config file.

@jonnieey
Copy link
Author

Well, generally command line argument overide configuration options. Yeah, I think command line args should take preceedence over config options.
should read config file first (the default), then if cmd args are provided overide those argurments in the config file by the cmd arg, else use the config file args.

@andmarti1424
Copy link
Owner

I commited a change to dev branch to now allow overloading nocurses that way. It should not crash anymore.

@jonnieey
Copy link
Author

Thanks, that was quick. Works perfect. Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants