Commit Graph

14 Commits

Author SHA1 Message Date
Storm Dragon
16d146a9ae Implement reliable HTML heading navigation using tag-based detection
This commit completely overhauls the heading navigation feature (d/shift+D keys)
to use actual HTML tag information instead of unreliable text-based heuristics.

Key improvements:
- Navigation now works 100% reliably by tracking actual <h1>-<h6> HTML tags
- Eliminates false positives from bold text, links, and buttons
- No longer navigates to blank lines around headings
- Provides true screen reader-style heading navigation

Technical implementation:
- Added LINE_FLAG_HEADING flag to mark heading lines during HTML processing
- Enhanced readbuffer with in_heading field to track heading tag state
- Modified HTML parser to set/clear heading flags on <h>/<\/h> tags
- Updated TextLine and Line structures to preserve heading information
- Simplified navigation functions to use reliable flag-based detection
- Added content length check to avoid marking blank spacing lines

Also includes compilation fixes for modern GCC:
- Fixed function pointer type compatibility issues
- Updated signal handler declarations
- Resolved deprecation warnings for various system calls

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 02:11:37 -04:00
Storm Dragon
d20be554e3 Initial commit with heading and form navigation keys added. 2025-08-15 02:17:12 -04:00
Rene Kita
916104b7f2 Remove unused variable 2022-02-20 11:14:53 +01:00
Kuang-che Wu
b0ebd5737e fix StrStream memory leak
ISclose() doesn't free memory if a stream's function pointer, close, is NULL.
However, str_stream's close pointer is always NULL and thus leaks
memory.
2021-10-26 16:28:37 +08:00
Rene Kita
cab914ef48 Fix manipulation of ASN1_STRING
Take the correct type from ASN1_STRING_get0_data() to fix a warning.
IA5Strings are ASCII, we do not need to care about signedness.

Since the pointer returned by ASN1_STRING_get0_data() points to internal
memory of the ASN1_STRING we are not allowed to manipulate the data.
Also it is not guaranteed that the data is null terminated. Copy the
data to our own buffer and make sure it is null terminated before using
it.
2021-09-13 10:04:49 +02:00
Tatsuya Kinoshita
8c32ce830c Indentation fix 2018-10-26 21:13:46 +09:00
Mark Wright
d10007a2c6 Do not use deprecated features with openssl-1.1 2018-10-24 16:00:04 +02:00
David Crosby
7e5b33c30e Remove dead assignments flagged by Clang static analysis 2015-08-11 21:59:27 +09:00
Tatsuya Kinoshita
f7ff70f6da Merge branch 'bug/win64gc'
Conflicts:
	istream.c
	main.c
2013-10-14 23:02:26 +09:00
AIDA Shinra
ec81194f38 Workaround of GC crash on Cygwin64
Patch from <http://www.j10n.org/files/w3m-cvs-1.1055-win64gc.patch>,
[w3m-dev:04469] on 2013-10-14.
2013-10-14 22:31:01 +09:00
Tatsuya Kinoshita
282700e60c Fix that struct file_handle conflicts with glibc 2.14
Patch from Ubuntu to unbreak compilation with eglibc 2.14. (LP: #935540)
2012-05-02 22:12:20 +09:00
Tatsuya Kinoshita
5397d09e58 Adding upstream version 0.5.3 2011-05-04 16:41:45 +09:00
Tatsuya Kinoshita
6db339b3d7 Adding upstream version 0.5.2 2011-05-04 16:23:02 +09:00
Tatsuya Kinoshita
72f72d64a4 Adding upstream version 0.5.1 2011-05-04 16:05:14 +09:00