1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00
Commit Graph

303 Commits

Author SHA1 Message Date
Witold Filipczyk
4e6d3a0037 [meson] ncursesw dependency when built --with-terminfo 2021-04-12 21:17:27 +02:00
sgerwk
91819222af code cleanup 2021-03-20 17:20:26 +01:00
sgerwk
b21dea1ba0 close stdin before calling a background program
The solution with fork() is more general, but it unnecessarily produces two new
process: one in exe_no_stdin(), one in system(). The solution with FD_CLOEXEC
is simpler as it only requires changing and restoring a flag of stdin, but I
suspect it may not be available in all OSes elinks can be compiled for.
2021-03-20 00:58:54 +01:00
Witold Filipczyk
7b749dccb4 [terminal] itrm_queue data must be unsigned char * . Refs #87 2021-01-17 18:28:42 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
5f87bdbcb2 [meson] meson build scripts.
Not finished yet, but I added to motivate myself and others.
The goal is to get a few seconds faster builds.

autotools still will be available.
2020-09-05 22:06:01 +02:00
sgerwk
85cb50c7e2 fix previous commit 2020-06-24 19:22:21 +02:00
sgerwk
0e820ad3cd do not enable mouse from keyboard initialization if mouse is disabled 2020-06-24 17:38:50 +02:00
Witold Filipczyk
66c476a754 [mouse] Initialization of variable was not necessary. 2020-05-26 21:36:46 +02:00
sgerwk
bb66fd3c37 config option for disabling the mouse 2020-05-26 00:29:57 +02:00
Witold Filipczyk
60f6c35a2c [config] Config option "ui.tostop" . Refs #45
ui.tostop decides whether to stop background processes trying to write
to the terminal. Default enabled.
2020-05-13 20:51:37 +02:00
Witold Filipczyk
df3a79bed5 Revert "[terminal] Try to fix #45 as suggested by Debian user"
This reverts commit a3e84e27c7.
2020-05-13 20:33:00 +02:00
Witold Filipczyk
a3e84e27c7 [terminal] Try to fix #45 as suggested by Debian user 2020-05-10 16:11:52 +02:00
Witold Filipczyk
51dd9e7e6e [color] Revert changes related to leading and trailing spaces and colours
It did not look good.
2019-11-21 21:01:49 +01:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Witold Filipczyk
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
2c6d782aef Check returned value of tiparm. 2017-11-28 22:07:57 +01:00
Witold Filipczyk
d466e84eb6 TERMINFO does not work well for linux-m 2017-11-28 20:31:41 +01:00
Witold Filipczyk
03968b93c8 Do not use terminfo for true color mode. 2017-11-25 11:46:28 +01:00
Witold Filipczyk
0420ce5cc9 Similar code as in original ELinks.
Still issues with displaying freshcode.club on konsole.
2017-11-23 18:00:20 +01:00
Witold Filipczyk
d1ddf27332 Cleaner code of checking if line is dirty. 2017-11-23 15:53:52 +01:00
Witold Filipczyk
2bd6ac3f08 terminfo_cursor_address 2017-11-23 13:39:04 +01:00
Witold Filipczyk
49f41d4371 Rewritten add_chars macro.
Before it redrawn only changed cells, but were problems with ghosts.
See test/fresh.html. Now it redraws whole lines, which were modified.
2017-11-23 11:40:21 +01:00
Witold Filipczyk
4d85cd24eb Removed code suspected for traces on screen when scrolling. 2017-11-22 18:19:32 +01:00
Witold Filipczyk
99058d53d7 terminfo_max_colors() 2017-11-21 15:36:28 +01:00
Witold Filipczyk
d8e749c0f4 terminfo_clear_screen 2017-11-20 11:28:53 +01:00
Witold Filipczyk
299e2b9aa4 Missing files 2017-11-19 20:18:44 +01:00
Witold Filipczyk
c4cb7ed8e5 Beginnings of terminfo support.
--with-terminfo must be added for configure
and --terminfo to command line.
terminfo is only used for output and not all sequences are changed.
2017-11-19 18:29:38 +01:00
Witold Filipczyk
9175f8ed39 Terminate slave browsers with libev(ent). 2017-11-18 15:16:22 +01:00
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
89387e3679 Compilation fix (C++) 2016-04-20 19:41:12 +02:00
Witold Filipczyk
8cf00fa61c delete -> delete_ for C++ compatibility 2016-04-20 18:57:32 +02:00
Witold Filipczyk
ca18522eec Revert "Shorten add_chars. Do not call compare_fg_color and compare_bg_color."
This reverts commit 8132c156dd.
On download dialog cursor jumps too much
2015-09-17 21:38:35 +02:00
Witold Filipczyk
8132c156dd Shorten add_chars. Do not call compare_fg_color and compare_bg_color.
Some sites while scrolling showed "artifacts". For example twojepc.pl.
2015-09-17 21:08:15 +02:00
Kalle Olavi Niemitalo
263c1836cb Don't retry get_window_title
Call get_window_title() at most once per terminal, even if it fails.
If ELinks is configured with X11 support, get_window_title() calls
XOpenDisplay(), which can sleep if $DISPLAY does not respond.
This delay was previously incurred every time ELinks changed the
title.  Besides, if ELinks had already changed the title, setting
ditrm->orig_title = get_window_title(); did not make sense anyway.
(cherry picked from elinks-0.12 commit 5d4beadc4b)

Conflicts:
	src/terminal/kbd.c:
		get_window_title has a codepage parameter in 0.13.GIT.
2012-11-03 22:14:48 +02:00
Kalle Olavi Niemitalo
6f4c95cc7f Bug 943: Refuse user JS actions in unfocused tabs
(cherry picked from elinks-0.12 commit 51dc3beee7)

Conflicts:
	NEWS: Both 0.12pre5.GIT and 0.13.GIT had inserted a new section.
	src/terminal/window.c: Both had inserted a new function.
2012-11-03 22:10:27 +02:00
witekfl
42d2433f4b Color leading spaces with the color of the first non-space character.
Also color trailing spaces with the color of the last character.

See for example gtk-doc.
2012-07-11 11:14:03 +02:00
witekfl
36070d3277 The union of the color and the node_number in the struct screen_char.
The long term goal is good looking of the Python docs in ELinks, especially
background colors. Every start tag and every text node would have associated
a natural number. Those numbers would be "drawn" in the document instead
of colors. Finally, the screen driver would change numbers into colors.

This will be done in small steps. The next step is to implement this change
in the screen driver.
2012-03-03 11:27:58 +01:00
Miciah Dashiel Butler Masters
c74ddb29c5 SMJS: add terminal object
Add terminal_class, which defines a JSObject wrapper for struct terminal.

Add terminal_array_class, which defines a JSObject wrapper for accessing
the "terminals" linked list of struct terminal.

Add session_array_class, which defines a JSObject wrapper for accessing the
tabs (sessions) of a terminal.

Add pointers from struct terminal to the terminal_class object and
the session_array_class object.

Add terminal_props and terminal_get_property for terminal_class.

Add terminal_finalize, which clears the pointers between a struct terminal
and the JSObject wrapper in question.

Add smjs_init_terminal_interface, which creates a terminal_array_class
instance and assigns it to  the "terminal" property on the "elinks" object.
Call smjs_init_terminal_interface from smjs_init_elinks_object.

Add smjs_get_terminal_object and smjs_get_session_array_object to get
the wrapper objects for a given struct terminal, and add
smjs_get_terminal_array_object to get a terminal_array_class object.

Add smjs_detach_terminal_object and smjs_detach_session_array_object, which
clear the pointers between a given struct terminal and its JSObject
wrappers.

Add terminal_array_get_property for terminal_array_class.

Add session_array_get_property for session_array_class.
2011-11-14 04:34:51 +00:00
witekfl
ab8fa8daed Revert "redraw_terminal_cls instead of redraw_terminal in delete_window."
This reverts commit 03c698e926.
2011-07-06 13:23:30 +02:00
witekfl
03c698e926 redraw_terminal_cls instead of redraw_terminal in delete_window.
On http://pcarena.pl/ the msgbox is shown saying,
that document.getElementById is not a function.
The "ghosts" remained after pressing OK.
2011-06-17 14:33:46 +02:00
Kalle Olavi Niemitalo
d1245c73a8 Recode X11 window title when saving and restoring
gnome-terminal 2.30.2 expects UTF-8 in the "OSC Ps ; Pt BEL" sequence
that sets the window title.  However, XGetWMName typically returns the
title in "STRING" (Latin-1) or "COMPOUND_TEXT" (escape sequences)
encoding.  Recode the title to restore it correctly.  This helps
especially in the fi_FI.UTF-8 locale, where gnome-terminal has "Pääte"
as the default title.

Related to bugs 885 and 336.
2011-04-11 22:13:38 +03:00
Miciah Dashiel Butler Masters
af5e54d95f send_kbd_event: Fix accesskeys when priority = 0
With document.browse.accesskey.priority = 0, accesskeys were ignored if
the current tab was not the last (rightmost) tab.  This commit fixes the
problem.

Add a function tabs_are_on_top(struct terminal *) which returns
a Boolean value indicating whether the topmost window is a tab (as
opposed to, e.g., a menu).

This commit fixes commit 1bd498cde9.
2011-01-19 03:44:50 +00:00
Witold Filipczyk
17f82a3e21 Decode ESC color sequences in the plain renderer.
Added functions for screen_char->color -> color_T conversion.
2010-07-31 20:51:24 +02:00
Witold Filipczyk
b456fba69f Compilation fix. 2010-03-21 17:18:32 +01:00
Miciah Dashiel Butler Masters
60c50ea378 Fix a compilation error.
Fix another silly error that I introduced in commit
3334efb32c.
2009-05-22 21:54:47 +00:00
Miciah Dashiel Butler Masters
f1dee0d04f Drop special handling of ctrl-l
Drop special handling of ctrl-l in handle_interlink_event.

To make sure that the 'redraw' action works everywhere, first modify
menu_kbd_handler and mainmenu_kbd_handler to handle ACT_MENU_REDRAW; and
second, drop the ACTION_REQUIRE_VIEW_STATE flag from the 'redraw' action in
the 'main' keymap so that it works even if there is no document loaded.

Ctrl-l is already bound to 'redraw' in all keymaps by default, so the
current default behaviour is preserved.
2009-05-22 19:50:28 +00:00