1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-17 01:16:16 -04:00
Commit Graph

309 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
ef548e5728 Merge branch 'elinks-0.12'
Conflicts:
	src/session/download.c
	src/session/download.h
	src/viewer/text/view.c
2009-07-24 18:32:25 +03:00
Kalle Olavi Niemitalo
db128fecd9 download: Add DOWNLOAD_EXTERNAL flag
Like in ELinks 0.13.GIT commit b3cfede1c1
made on 2007-11-07, only with more comments and a bit different names.
2009-07-24 18:09:59 +03:00
Kalle Olavi Niemitalo
a2c8dc8c61 download: Rename download_resume to download_flags
Bring the code closer to ELinks 0.13.GIT commit
71ccbe0f8d made on 2007-11-07.
Don't define a separate download_flags_T typedef though,
because Doxygen generates nicer links if the enum is used directly.
2009-07-24 17:10:35 +03:00
Kalle Olavi Niemitalo
9f217ba897 Add typedefs for type_query-related callbacks
Doxygen isn't too good at documenting the parameters of a callback
within the documentation of a parameter that points to the callback.
A typedef provides a better place to document the parameters.
2009-07-18 00:09:08 +03:00
Kalle Olavi Niemitalo
6032bc730a Disable resuming download of formatted document
If the user chose File -> Save formatted document and typed the name
of an existing file, ELinks offered to resume downloading the file.
There are a few problems with that:

* save_formatted_finish does not actually support resuming.  It would
  instead overwrite the beginning of the file and not truncate it.

* When save_formatted calls create_download_file, cdf_hop->data
  ends up pointing to struct document.  If the user then chooses to
  resume, lun_resume would read *(int *)cdf_hop->data, hoping to
  get cmdw_hop.magic or codw_hop.magic.  struct document does not
  begin with any such magic value.

* Because ELinks already has the formatted document in memory,
  resuming saves neither time nor I/O.

So don't show the "Resume download of the original file" button in
this situation.
2009-07-14 10:27:09 +03:00
Kalle Olavi Niemitalo
7bb51e7139 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	configure.in
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (kept 0.13.GIT)
	po/be.po (kept 0.13.GIT)
	po/bg.po (kept 0.13.GIT)
	po/ca.po (kept 0.13.GIT)
	po/cs.po (kept 0.13.GIT)
	po/da.po (kept 0.13.GIT)
	po/de.po (kept 0.13.GIT)
	po/el.po (kept 0.13.GIT)
	po/es.po (kept 0.13.GIT)
	po/et.po (kept 0.13.GIT)
	po/fi.po (kept 0.13.GIT)
	po/fr.po (kept 0.13.GIT)
	po/gl.po (kept 0.13.GIT)
	po/hr.po (kept 0.13.GIT)
	po/hu.po (kept 0.13.GIT)
	po/id.po (kept 0.13.GIT)
	po/is.po (kept 0.13.GIT)
	po/it.po (kept 0.13.GIT)
	po/lt.po (kept 0.13.GIT)
	po/nb.po (kept 0.13.GIT)
	po/nl.po (kept 0.13.GIT)
	po/pl.po (kept 0.13.GIT)
	po/pt.po (kept 0.13.GIT)
	po/pt_BR.po (kept 0.13.GIT)
	po/ro.po (kept 0.13.GIT)
	po/ru.po (kept 0.13.GIT)
	po/sk.po (kept 0.13.GIT)
	po/sr.po (kept 0.13.GIT)
	po/sv.po (kept 0.13.GIT)
	po/tr.po (kept 0.13.GIT)
	po/uk.po (kept 0.13.GIT)
	src/ecmascript/ecmascript.c
2009-07-11 16:47:33 +03:00
Yuriy M. Kaminskiy
e5f4c59a20 Fixes failure to search for more than one double-width character. 2009-06-29 23:33:28 +03:00
Kalle Olavi Niemitalo
e452420d5f Debian bug 534835: Don't assert ecmascript_reset_state succeeds
After the recent ecmascript_get_interpreter change, I got an assertion
failure in render_document, which calls ecmascript_reset_state and
then asserts that it has set vs->ecmascript != NULL.
ecmascript_reset_state cannot guarantee that because there might not
even be enough free memory for mem_calloc(1, sizeof(struct
ecmascript_interpreter).  So, replace the assertion in render_document
with error handling, and likewise in call_onsubmit_and_submit.
2009-06-28 11:17:06 +03:00
Miciah Dashiel Butler Masters
bd752e95ad get_search_region_from_search_nodes: add comment
Document why we add pattern_len to doclen.
2009-05-22 20:39:47 +00:00
Miciah Dashiel Butler Masters
812c4bafc1 get_search_region_from_search_nodes: simplify
Simplify the end-of-line check in get_search_region_from_search_nodes by
relying on the fact that the n member of an instance of struct search
that marks the end of a line will be 0.
2009-05-22 20:26:32 +00:00
Miciah Dashiel Butler Masters
da838a9317 Include last character of document in search range
Allow searching on the last character of the document.  Plain-text searches
already match on the last character as long as it isn't the first character
of a match, and regular-expression searches match on the last character if
the search pattern is longer than 1 character, so the problem addressed by
this commit is very much a corner case.

This commit reverts a portion of commit
fd15049622594d151104d43917984c7ce10993e6 (CVS revision 1.17).
2009-05-22 20:19:59 +00:00
Miciah Dashiel Butler Masters
8d8ff02bbf Fix behaviour for search-toggle-regex
text_typeahead_handler: Document that passing -2 for action_id will cause
a search without error reporting.  This behaviour is unintentionally the
current behaviour of text_typeahead_handler, but now it is documented so
that it can be used.

input_line_event_handler: When rewinding, pass -2 for the action_id
parameter to the handler instead of passing again whatever action led to
the rewinding.

The old behavior of input_line_event_handler was particularly problematic
with the search-toggle-regex action and the text_typeahead_handler handler:
input_line_event_handler would call the handler with
ACT_EDIT_SEARCH_TOGGLE_REGEX, and the handler would toggle the setting and
perform the search again; then if the search string no longer matched
anything, the handler would return INPUT_LINE_REWIND to
input_line_event_handler, which would rewind and call the handler with
ACT_EDIT_SEARCH_TOGGLE_REGEX again, thus toggling the option back to the
original setting.

With the new behaviour, input_line_event_handler will not repeat the same
action when re-invoking the handler; in the above example with
search-toggle-regex, the search string will simply be rewound until it
matches with the new setting.
2009-05-22 20:15:52 +00:00
Miciah Dashiel Butler Masters
0ced0c9851 do_typeahead: restructure.
Reduce indentation, eliminate a goto, and make the code a little clearer
(IMO).
2009-05-22 20:11:26 +00:00
Miciah Dashiel Butler Masters
d17a632417 field_op: use goto_link (micro-optimisation)
Use the newly introduced goto_link instead of goto_current_link in field_op
since field_op already looks up the current link.
2009-05-22 20:05:16 +00:00
Miciah Dashiel Butler Masters
9e5d79a803 Follow right link when link onClick changes docs
When a link had an onClick event handler that changed the current
document and that link was clicked, ELinks would follow the current link
of the document displayed after executing the handler instead of the
link that was clicked.

Factor goto_link out of goto_current_link.

Use goto_link instead of goto_current_link in activate_link to ensure that
the link that is passed in by enter() is followed.
2009-05-22 20:00:59 +00:00
Kalle Olavi Niemitalo
82e67f8ebc Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/intl/charsets.h
	src/viewer/text/search.c
2009-05-21 19:50:16 +03:00
Kalle Olavi Niemitalo
0c756fc3e8 TRE: Check for 32-bit wchar_t at configure time
This check used to be in src/elinks.h.  Move it to configure.in so
that (1) the result can be logged and (2) ELinks won't even link with
TRE if wchar_t prevents its use.

Also, rename HAVE_TRE_REGEX_H to CONFIG_TRE, to reflect that it is not
always defined if the header exists.
2009-05-21 17:22:12 +03:00
Miciah Dashiel Butler Masters
84259ff26a Fix crash on search-toggle-regex when RE disabled
Check the return value of get_opt_rec on "document.browse.search.regex"
before dereferencing it.  The option is not there if regular expression
support is disabled at build time.

This commit fixes a bug introduced in commit
b2d51c75ff0d6c52a4f6a2761801beb641cba3a2.
2009-02-22 04:06:51 +00:00
Miciah Dashiel Butler Masters
b81821a21c Fix crash on search-toggle-regex when RE disabled
Check the return value of get_opt_rec on "document.browse.search.regex"
before dereferencing it.  The option is not there if regular expression
support is disabled at build time.

This commit fixes a bug introduced in commit
b2d51c75ff0d6c52a4f6a2761801beb641cba3a2.
2009-02-22 04:00:05 +00:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Witold Filipczyk
c5a7f87c43 Bug 1060: Use libtre for regexp searches.
When the user tells ELinks to search for a regexp, ELinks 0.11.0
passes the regexp to regcomp() and the formatted document to
regexec(), both in the terminal charset.  This works OK for unibyte
ASCII-compatible charsets because the regexp metacharacters are all in
the ASCII range.  And ELinks 0.11.0 doesn't support multibyte or
ASCII-incompatible (e.g. EBCDIC) charsets in terminals, so it is no
big deal if regexp searches fail in such locales.

ELinks 0.12pre1 attempts to support UTF-8 as the terminal charset if
CONFIG_UTF8 is defined.  Then, struct search contains unicode_val_T c
rather than unsigned char c, and get_srch() and add_srch_chr()
together save UTF-32 values there if the terminal charset is UTF-8.
In plain-text searches, is_in_range_plain() compares those values
directly if the search is case sensitive, or folds them to lower case
if the search is case insensitive: with towlower() if the terminal
charset is UTF-8, or with tolower() otherwise.  In regexp searches
however, get_search_region_from_search_nodes() still truncates all
values to 8 bits in order to generate the string that
search_for_pattern() then passes to regexec().  In UTF-8 locales,
regexec() expects this string to be in UTF-8 and can't make sense of
the truncated characters.  There is also a possible conflict in
regcomp() if the locale is UTF-8 but the terminal charset is not, or
vice versa.

Rejected ways of fixing the charset mismatches:

* When the terminal charset is UTF-8, recode the formatted document
  from UTF-32 to UTF-8 for regexp searching.  This would work if the
  terminal and the locale both use UTF-8, or if both use unibyte
  ASCII-compatible charsets, but not if only one of them uses UTF-8.

* Convert both the regexp and the formatted document to the charset of
  the locale, as that is what regcomp() and regexec() expect.  ELinks
  would have to somehow keep track of which bytes in the converted
  string correspond to which characters in the document; not entirely
  trivial because convert_string() can replace a single unconvertible
  character with a string of ASCII characters.  If ELinks were
  eventually changed to use iconv() for unrecognized charsets, such
  tracking would become even harder.

* Temporarily switch to a locale that uses the charset of the
  terminal.  Unfortunately, it seems there is no portable way to
  construct a name for such a locale.  It is also possible that no
  suitable locale is available; especially on Windows, whose C library
  defines MB_LEN_MAX as 2 and thus cannot support UTF-8 locales.

Instead, this commit makes ELinks do the regexp matching with regwcomp
and regwexec from the TRE library.  This way, ELinks can losslessly
recode both the pattern and the document to Unicode and rely on the
regexp code in TRE decoding them properly, regardless of locale.

There are some possible problems though:

1. ELinks stores strings as UTF-32 in arrays of unicode_val_T, but TRE
   uses wchar_t instead.  If wchar_t is UTF-16, as it is on Microsoft
   Windows, then TRE will misdecode the strings.  It wouldn't be too
   hard to make ELinks convert to UTF-16 in this case, but (a) TRE
   doesn't currently support UTF-16 either, and it seems possible that
   wchar_t-independent UTF-32 interfaces will be added to TRE; and (b)
   there seems to be little interest on using ELinks on Windows anyway.

2. The Citrus Project apparently wanted BSD to use a locale-dependent
   wchar_t: e.g. UTF-32 in some locales and an ISO 2022 derivative in
   others.  Regexp searches in ELinks now do not support the latter.

[ Adapted to elinks-0.12 from bug 1060 attachment 506.
  Commit message by me.  --KON ]
2009-02-08 18:26:22 +02:00
Witold Filipczyk
ba70d61051 762: Instead of setting a bare pointer for task.target.frame always
use the dynamically allocated value. null_or_stracpy and mem_free_set
macros are used. Slower, but safer.
2009-01-01 22:06:59 +01:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
ad45176dde Add get_terminal_codepage().
This simplifies the callers a little and may help implement
simultaneous support for different charsets on different terminals
of the same type (bug 1064).
2009-01-01 16:16:17 +00:00
Kalle Olavi Niemitalo
d668b3b6aa mouse: Exit cursor-routing mode when a link is clicked
Before this patch, if you first moved the cursor to link X with
move-cursor-up and similar actions, and then clicked link Y with the
mouse, ELinks would activate link X, i.e. not the one you clicked.
This happened because the NAVIGATE_CURSOR_ROUTING mode was left
enabled and made ELinks ignore the doc_view->vs->current_link
member that ELinks had updated according to the click.
Make ELinks return the session to NAVIGATE_LINKWISE mode, so that
the update takes effect.

Reported by Paul B. Mahol.
(cherry picked from commit 4086418069)
2008-12-28 13:24:07 +02:00
Miciah Dashiel Butler Masters
b9b2b75f73 Drop zero-initialisation of static storage
In get_entity_string and point_intersect, do not initialise arrays with
static storage duration to zero; the C standard states that such objects
are automatically initialised to zero.
2008-12-27 05:32:36 +00:00
Kalle Olavi Niemitalo
0ec4f380fa Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	AUTHORS
2008-11-10 00:07:20 +02:00
Peter Collingbourne
658b9cc70f Fixed bug relating to newlines in hidden input fields
This patch fixes an issue whereby a newline character appearing within
a hidden input field is incorrectly reinterpreted as a space character.
The patch handles almost all cases, and includes a test case.
15/18 tests pass, but the remainder currently fail due to the fact
that ELinks does not currently support textarea scripting.
2008-11-09 23:28:46 +02:00
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00
Kalle Olavi Niemitalo
018af50f1d Rename cache_entry.id and related members.
cache_entry.id => cache_entry.cache_id
document.id => document.cache_id
ecmascript_interpreter.onload_snippets_owner => .onload_snippets_cache_id

This is a combination of:

commit 232c07aa7f
bug 1009: id variables renamed, added document_id to the document.

commit 6007043458bf8f14abfc18b9db60785bdc0279f6
Revert addition of document.document_id
2008-08-03 21:27:56 +03:00
Kalle Olavi Niemitalo
6b9be71150 1018: Avoid assertion failure in SELECT pop-up for non-current tab
Check in refresh_view() whether the tab is still current; if not, skip
the draw_doc() and draw_frames() calls because draw_current_link()
called within them asserts that the tab is current.  However, do
always call print_screen_status(), because that handles non-current
tabs correctly too.

I think it was not yet possible to trigger the assertion failure with
setTimeout, because input.value modifications by ECMAScript do not
trigger a redraw (bug 1035).
2008-07-22 12:13:27 +03:00
Kalle Olavi Niemitalo
bbee237ff0 Merge branch 'elinks-0.12' into elinks-0.13 2008-07-20 14:47:40 +03:00
Kalle Olavi Niemitalo
759fbb1142 952, 954: Add ecmascript_detach_form_view stub
Anything that frees struct form_view must now call the new function
ecmascript_detach_form_view.  This function should then clear out any
dangling pointers, but that has not yet been implemented.
2008-07-18 20:00:16 +03:00
Kalle Olavi Niemitalo
bbadb99dd1 952, 954: Add ecmascript_{detach,moved}_form_state stubs
Anything that frees or reallocates struct form_state must now call the
new functions ecmascript_detach_form_state or ecmascript_moved_form_state.
These functions should then clear out any dangling pointers, but that has
not yet been implemented.
2008-07-18 19:56:49 +03:00
Kalle Olavi Niemitalo
e9d4d3aef2 Fix crash after a tab was opened during reload.
Commit 0b99fa70ca "Bug 620: Reset form
fields to default values on reload" made render_document() decrement
vs->form_info_len to 0 while vs->form_info remained non-NULL.
copy_vs() then copied the whole structure with copy_struct and did not
change form_info because form_info_len was 0.  Both view_state
structures had form_info pointing to the same memory block, causing a
segfault when destroy_vs() tried to free that block a second time.

Reported by أحمد المحمودي.
2008-07-15 11:43:03 +03:00
Kalle Olavi Niemitalo
e287ca9265 1030: Wrap get_search_region_from_search_nodes in #ifdef HAVE_REGEX_H
This change avoids the following error:

gcc -DHAVE_CONFIG_H -I../../.. -I/home/Kalle/src/elinks-0.11/src -I/home/Kalle/prefix/include -I/usr/include/smjs -I/usr/include -I/usr/include/lua50 -I/usr/include -I/usr/include -O0 -ggdb -Wall -Wall -Werror -fno-strict-aliasing -Wno-pointer-sign -Wno-address -fno-strict-overflow -o search.o -c /home/Kalle/src/elinks-0.11/src/viewer/text/search.c
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.11/src/viewer/text/search.c:257: warning: 'get_search_region_from_search_nodes' defined but not used
make[3]: *** [search.o] Error 1
make[3]: Leaving directory `/home/Kalle/build/i686-pc-linux-gnu/elinks-0.11/src/viewer/text'

get_search_region_from_search_nodes is called only from
search_for_pattern, which already was inside #ifdef HAVE_REGEX_H.
(cherry picked from commit 2aec302d47)
2008-07-14 22:38:08 +03:00
Witold Filipczyk
e83f76b79e 1030: Fixed issue with undefined HAVE_REGEX_H.
(cherry picked from commit 442b0d83b0)
2008-07-14 22:36:52 +03:00
Kalle Olavi Niemitalo
988cec481b Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
	configure.in

The following files also conflicted, but they had not been manually
edited in the elinks-0.12 branch after the previous merge, so I just
kept the 0.13.GIT versions:

	doc/man/man1/elinks.1.in
	doc/man/man5/elinks.conf.5
	doc/man/man5/elinkskeys.5
	po/fr.po
	po/pl.po
2008-07-11 22:28:45 +03:00
Kalle Olavi Niemitalo
42123dab87 1008: percent-encode file names in uri.post
In uri.post, each file name begins and ends with FILE_CHAR.
Previously, file names were not encoded, and names containing
FILE_CHAR could not be used.  Because FILE_CHAR is a control
character, the user cannot directly type it in a file input field,
so ELinks asserted that the field did not contain FILE_CHAR.
However, it is possible to get FILE_CHAR in a file input field
with file name completion (ACT_EDIT_AUTO_COMPLETE), causing the
assertion to fail.  Now, ELinks encodes FILE_CHAR as "%02", so it
is no longer ambiguous and the assertion is not needed.
2008-07-11 14:44:35 +03:00
Kalle Olavi Niemitalo
50a3244dfb 1008: document the format of uri.string and uri.post 2008-07-11 14:20:47 +03:00
Miciah Dashiel Butler Masters
5733f17856 goto_current_link: do nothing on input buttons
The following is in the HTML 4 standard
(<http://www.w3.org/TR/html401/interact/forms.html#push-button>):

    push buttons: Push buttons have no default behavior. Each push
    button may have client-side scripts associated with the element's
    event attributes. When an event occurs (e.g., the user presses the
    button, releases it, etc.), the associated script is triggered.

Currently, a button such created by such HTML as "<input type="button"
value="foo" />" submits the form by default in ELinks.  According to
the above, it shouldn't.
2008-07-03 13:48:08 +03:00
Witold Filipczyk
429e08e073 bug 955: Do not call onsubmit for RESET. 2008-07-03 13:48:07 +03:00
Kalle Olavi Niemitalo
3e370677c4 1008: assert there's no FILE_CHAR in file names 2008-06-04 01:15:07 +03:00
Kalle Olavi Niemitalo
7a72a685e5 1008: Centralize random numbers.
If ELinks is being linked with SSL library, use its random number
generator.

Otherwise, try /dev/urandom and /dev/prandom.  If they do not work,
fall back to rand(), calling srand() only once.  This fallback is
mostly interesting for the Hurd and Microsoft Windows.

BitTorrent piece selection and dom/test/html-mangle.c still use rand()
(but not srand()) directly.  Those would not benefit from being
unpredictable, I think.
2008-05-25 18:44:21 +03:00
Witold Filipczyk
5c885def9b 1008: Do not check boundaries, use random ones. 2008-05-17 18:20:13 +02:00
Witold Filipczyk
ffcd91a30d 1008: Comments.
G: -----------------------------------------------------------------------
2008-05-12 13:01:51 +02:00
Witold Filipczyk
f09a5f235e 1008: s/big_file/file/g . 2008-05-12 12:51:53 +02:00
Witold Filipczyk
9f768354b9 1008: Moved the definition of the big_files_offset to the form.c. 2008-05-12 12:42:43 +02:00
Witold Filipczyk
5458346e6e 1008: Use the new code for all files, not only for bigger ones. 2008-05-12 12:37:00 +02:00
Witold Filipczyk
ec382345c8 1008: upload of big files.
Files bigger than 65536 bytes are loaded on "demand".
TODO: Add a progress bar of uploads.
2008-05-11 13:13:49 +02:00
Witold Filipczyk
232c07aa7f bug 1009: id variables renamed, added document_id to the document.
cached->id => cached->cache_id
document->id => document->cache_id
onload_snippets_owner => onload_snippets_document_id
Added the distinct document->document_id.
Always reset ecmascript when a document changes for example a next chunk
of it is loaded.
2008-04-27 23:22:08 +03:00
Miciah Dashiel Butler Masters
3a0286e447 Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:19:23 +00:00
Miciah Dashiel Butler Masters
643a34e6af Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:09:18 +00:00
Kalle Olavi Niemitalo
64102db7ae Bug 867: Don't consume KBD_MOD_PASTE to enter insert mode.
In the previous version, the first event that had KBD_MOD_PASTE
entered insert mode and was consumed for that; ELinks then inserted
the characters from the remaining events.  Now, to make ELinks insert
the first character too, I'm changing things so that KBD_MOD_PASTE
does not cause insert mode to be entered; instead, ELinks inserts
those characters regardless of whether insert mode is on.
2008-01-19 18:12:57 +02:00
Kalle Olavi Niemitalo
a5bb4f1011 Bug 867: Request and recognize bracketed paste.
This is based on attachment 389 from bugzilla.elinks.cz
but there were a number of conflicts already.
2008-01-14 23:53:56 +02:00
Kalle Olavi Niemitalo
a307371d9e Comments about arithmetic in scrolling.
(cherry picked from commit 4871ad0643)
2007-12-16 01:14:08 +02:00
Witold Filipczyk
04387d8d6c Added function move_cursor_rel_count and used it
in move-link-left-line and others, so move-link-left-line ans others
do not use the keyboard prefix.
(cherry picked from commit 8b281e1404)
(cherry picked from commit 4f2a9eadfc)
2007-12-16 01:14:02 +02:00
Witold Filipczyk
f33b7dea02 Removed not existent function. Spotted by Kalle.
(cherry picked from commit a76ecfb8ca)
(cherry picked from commit 54cf868429)
2007-12-16 01:13:53 +02:00
Witold Filipczyk
617e33187d move-link-up-line and others: changed mode to NAVIGATE_CURSOR_ROUTING when
there is no link.
(cherry picked from commit 7db2f8c629)
(cherry picked from commit f62eca8d92)
2007-12-16 01:13:46 +02:00
Witold Filipczyk
61eb46e94d New action: move-cursor-line-start.
It moves cursor to the start of the line.
(cherry picked from commit 5ee1d3b2b3)
(cherry picked from commit 3a87ec55fc)
2007-12-16 01:13:39 +02:00
Witold Filipczyk
d358810a5f move-link-prev(next)-line: Typo with cut-n-paste. s/line/last/.
(cherry picked from commit 848852b75f)
(cherry picked from commit 64c385f0db)
2007-12-16 01:13:32 +02:00
Witold Filipczyk
d1d8c0632a move-link-up-line: segfault when cursor was below last line.
(cherry picked from commit c646c860cd)
(cherry picked from commit 9561d8d0fd)
2007-12-16 01:13:25 +02:00
Witold Filipczyk
175f355320 move-link-prev-line: Really fixed.
(cherry picked from commit 052f7a93bb)
(cherry picked from commit 1a9112945b)
2007-12-16 01:13:18 +02:00
Witold Filipczyk
885adc7a57 move-link-prev-line .. move-link-down-line: Fixed.
(cherry picked from commit bb0166279f)
(cherry picked from commit 27361d141a)
2007-12-16 01:13:12 +02:00
Witold Filipczyk
f2de26b2d5 Fixed the issue with multiline links.
(cherry picked from commit 3555f68059)
(cherry picked from commit 8863f4335f)
2007-12-16 01:13:04 +02:00
Witold Filipczyk
a282a98d4a Avoid segfault.
Go to the page with a few lines. Follow a link to a page with more lines.
Move cursor down, do not stay on a link.
Go back and do move-link-prev-line. This caused a segmentation fault.
(cherry picked from commit 888ba87516)
(cherry picked from commit 1cbd02c141)
2007-12-16 01:12:57 +02:00
Witold Filipczyk
d830833e62 move-link-down-line, move-link-prev-line, etc.:
Change mode to NAVIGATE_LINKWISE to preserve the link position when
going back.
(cherry picked from commit 14b37d0362)
(cherry picked from commit a594b2a002)
2007-12-16 01:12:49 +02:00
Witold Filipczyk
cb07a2630c actions: Fixed moving in frames.
(cherry picked from commit 2045574edc)
(cherry picked from commit 02af6696f5)
2007-12-16 01:12:41 +02:00
Witold Filipczyk
52dfc92523 viewer: Added new four actions requested by Ligesh.
move-link-down-line moves the cursor down to the line with a link.
move-link-up-line moves the cursor up to the line with a link.
move-link-prev-line moves to the previous link horizontally.
move-link-next-line moves to the next link horizontally.
(cherry picked from commit 8259a56e99)
(cherry picked from commit 2eb3532416)
2007-12-16 01:12:31 +02:00
Kalle Olavi Niemitalo
4871ad0643 Comments about arithmetic in scrolling. 2007-11-25 22:28:19 +02:00
Witold Filipczyk
4f2a9eadfc Added function move_cursor_rel_count and used it
in move-link-left-line and others, so move-link-left-line ans others
do not use the keyboard prefix.
(cherry picked from commit 8b281e1404)
2007-11-25 22:28:18 +02:00
Witold Filipczyk
54cf868429 Removed not existent function. Spotted by Kalle.
(cherry picked from commit a76ecfb8ca)
2007-11-25 22:28:18 +02:00
Witold Filipczyk
f62eca8d92 move-link-up-line and others: changed mode to NAVIGATE_CURSOR_ROUTING when
there is no link.
(cherry picked from commit 7db2f8c629)
2007-11-25 22:28:18 +02:00
Witold Filipczyk
3a87ec55fc New action: move-cursor-line-start.
It moves cursor to the start of the line.
(cherry picked from commit 5ee1d3b2b3)
2007-11-25 22:28:18 +02:00
Witold Filipczyk
64c385f0db move-link-prev(next)-line: Typo with cut-n-paste. s/line/last/.
(cherry picked from commit 848852b75f)
2007-11-25 22:28:17 +02:00
Witold Filipczyk
9561d8d0fd move-link-up-line: segfault when cursor was below last line.
(cherry picked from commit c646c860cd)
2007-11-25 22:28:17 +02:00
Witold Filipczyk
1a9112945b move-link-prev-line: Really fixed.
(cherry picked from commit 052f7a93bb)
2007-11-25 22:28:17 +02:00
Witold Filipczyk
27361d141a move-link-prev-line .. move-link-down-line: Fixed.
(cherry picked from commit bb0166279f)
2007-11-25 22:28:17 +02:00
Witold Filipczyk
8863f4335f Fixed the issue with multiline links.
(cherry picked from commit 3555f68059)
2007-11-25 22:28:16 +02:00
Witold Filipczyk
1cbd02c141 Avoid segfault.
Go to the page with a few lines. Follow a link to a page with more lines.
Move cursor down, do not stay on a link.
Go back and do move-link-prev-line. This caused a segmentation fault.
(cherry picked from commit 888ba87516)
2007-11-25 22:28:16 +02:00
Witold Filipczyk
a594b2a002 move-link-down-line, move-link-prev-line, etc.:
Change mode to NAVIGATE_LINKWISE to preserve the link position when
going back.
(cherry picked from commit 14b37d0362)
2007-11-25 22:28:16 +02:00
Witold Filipczyk
02af6696f5 actions: Fixed moving in frames.
(cherry picked from commit 2045574edc)
2007-11-25 22:28:16 +02:00
Witold Filipczyk
2eb3532416 viewer: Added new four actions requested by Ligesh.
move-link-down-line moves the cursor down to the line with a link.
move-link-up-line moves the cursor up to the line with a link.
move-link-prev-line moves to the previous link horizontally.
move-link-next-line moves to the next link horizontally.
(cherry picked from commit 8259a56e99)
2007-11-25 22:28:15 +02:00
Laurent MONIN
b3cfede1c1 Drop @safe parameter of create_download_file().
Use new flag DOWNLOAD_EXTERNAL instead.
2007-11-07 13:33:04 +01:00
Laurent MONIN
71ccbe0f8d Replace resume parameter by more generic flags.
Type download_flags_T and enum download_flag were introduced.
2007-11-07 12:57:13 +01:00
Laurent MONIN
f150f22ac9 Use color.background instead of bgcolor in struct document too.
Not useful but coherent with other changes.
2007-10-12 16:50:47 +02:00
Laurent MONIN
e2a5696f76 active_link.(fg|bg) -> active_link.color.(foreground|background) 2007-10-12 12:24:53 +02:00
Laurent MONIN
8df72685ce Rename struct active_link_options field color to enable_color.
It matches the corresponding option name better.
2007-10-12 12:19:27 +02:00
Laurent MONIN
6564aec93f Add a new entry Link Info under Link main menu.
It also adds a Link info entry in the link contextual menu.
No key is associated for now, action was named ACT_MAIN_LINK_INFO.
2007-10-10 10:47:24 +02:00
Miciah Dashiel Butler Masters
7033247905 Introduce start_document_refreshes()
start_document_refreshes() performs the NULL-pointer checks that
previously all callers to start_document_refresh() must perform
and then calls start_document_refresh().
2007-09-14 16:44:04 +02:00
Jonas Fonseca
8e3c2d6042 Move find_tag to document/document 2007-09-14 16:29:13 +02:00
Jonas Fonseca
0240c469b7 Merge branch 'elinks-0.12'
Conflicts:

	src/document/dom/renderer.c
2007-09-09 18:25:49 +02:00
Miciah Dashiel Butler Masters
a1a8696cce Introduce start_document_refreshes
start_document_refreshes performs the NULL-pointer checks that previously all callers to start_document_refresh must perform and then calls start_document_refresh.
2007-09-06 18:52:23 +00:00
Miciah Dashiel Butler Masters
596b9b4d72 Fix compiler warning
Initialise @td to NULL in textarea_edit.  Assert @td in done_textarea_data while we're at it.
2007-09-01 23:46:37 +00:00
Miciah Dashiel Butler Masters
e1f0c10926 Drop unneeded #include "util/lists.h" from viewer/text/textarea.c 2007-09-01 12:55:02 +00:00
Miciah Dashiel Butler Masters
312a48a24a Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks 2007-09-01 12:50:57 +00:00
Miciah Dashiel Butler Masters
14af901277 In free_textarea_data, set term->textarea_data to NULL 2007-09-01 12:49:02 +00:00
Miciah Dashiel Butler Masters
a66f6f8c90 Make the textarea_data member of struct terminal opaque
Move the definition of struct textarea_data back to src/viewer/text/textarea.c.
2007-09-01 12:02:21 +00:00
Miciah Dashiel Butler Masters
ac230ebc08 Add free_textarea_data wrapper for done_textarea_data and use in destroy_terminal
Unexport done_textarea_data.
2007-09-01 11:58:29 +00:00
Miciah Dashiel Butler Masters
6469344727 Export done_textarea_data and call in destroy_terminal to prevent leak
Previously, if a terminal crashed with an external editor open, the struct textarea_data would never be freed
2007-09-01 09:45:56 +00:00