Commit graph

17123 commits

Author SHA1 Message Date
Linus Groh
368fe0f7f8 LibVT: Don't paint selection with opacity
Fixes #5442.
2021-02-21 10:33:22 +01:00
AnotherTest
d8a3285d78 LibLine: Move the search editor exactly after the last line
Previously, we'd always put it right after the prompt.
2021-02-21 09:01:00 +01:00
AnotherTest
9790ee4649 LibLine: Make clear_lines() work when only clearing the current line 2021-02-21 09:01:00 +01:00
AnotherTest
6472e5239c LibLine: Update the lazy refresh data and flags in some more places
These were forgotten in the last LibLine commit, any changes to m_buffer
not going through insert() and remove_at_index() should also be updating
these.

Fixes #5440.
2021-02-21 09:01:00 +01:00
Andreas Kling
84b2d4c475 Kernel: Add "map_fixed" pledge promise
This is a new promise that guards access to mmap() with MAP_FIXED.

Fixed-address mappings are rarely used, but can be useful if you are
trying to groom the process address space for malicious purposes.

None of our programs need this at the moment, as the only user of
MAP_FIXED is DynamicLoader, but the fixed mappings are constructed
before the process has had a chance to pledge anything.
2021-02-21 01:08:48 +01:00
Tom
a0cbb9068b LibGUI: Let ScrollableWidget handle the wheel events of its ScrollBars
Route the ScrollBar's wheel event to the ScrollableWidget so it can
handle it itself. This allows it to handle it consistently (e.g.
speed) when the cursor is hovering the scroll bars rather than the
widget's contents.

Fixes #5419
2021-02-21 01:06:17 +01:00
Andreas Kling
cb2db3710b LibELF: Fix build with ELF_IMAGE_DEBUG 2021-02-21 00:48:00 +01:00
Andreas Kling
1bc859fb68 Kernel: Make UNMAP_AFTER_INIT imply NEVER_INLINE as well
We want to make sure these functions actually do get unmapped. If they
were inlined somewhere, the inlined version(s) would remain mapped.

Thanks to "thislooksfun" for the suggestion! :^)
2021-02-21 00:43:29 +01:00
Andreas Kling
f23b29f605 LibELF: Move DynamicObject::lookup_symbol() to DynamicLoader
Also simplify it by removing an unreachable code path.
2021-02-21 00:29:52 +01:00
Andreas Kling
a43910acc3 LibELF: Make SymbolLookupResult::address a VirtualAddress
Let's use a stronger type than void* for this since we're talking
specifically about a virtual address and not necessarily a pointer
to something actually in memory (yet).
2021-02-21 00:02:21 +01:00
Andreas Kling
c5d93e55d0 LibELF: Simplify DynamicObject::Symbol class a bit
We no longer need the create_undefined() helper function.
Also we don't need a member field for is_undefined().
2021-02-21 00:02:21 +01:00
Andreas Kling
1997d5de1a LibELF: Make symbol lookup functions return Optional<Symbol>
It was very confusing how these functions used the "undefined" state
of Symbol to signal lookup failure. Let's use Optional<T> to make things
a bit more understandable.
2021-02-21 00:02:21 +01:00
Andreas Kling
46c3ff2acf LibELF: Remove "always bind now" global flag
This looked like someone's forgotten debug mechanism.
2021-02-21 00:02:21 +01:00
Andreas Kling
ba1eea9898 LibELF+DynamicLoader: Rename DynamicObject::construct() => create() 2021-02-21 00:02:21 +01:00
Andreas Kling
01f1e480e5 LibELF: Fix various clang-tidy warnings
Remove a bunch of unused code, unnecessary const, and make some
non-object-specific member functions static.
2021-02-21 00:02:21 +01:00
Andreas Kling
0c0127dc3f LibELF: Use StringView instead of "const char*" in dynamic linker code
There's no reason to use C strings more than absolutely necessary.
2021-02-20 22:29:12 +01:00
Sameem Zahoor Taray
2c3f284b06
Run: Prevent printing [null] in case of empty history (#5433)
Pressing up-arrow or down-arrow with empty command history printed
[null] in the text area.

Fixes #5426
2021-02-20 22:28:54 +01:00
AnotherTest
074e2ffdfd LibLine: Avoid refreshing the entire line when inserting at the end
This patchset allows the editor to avoid redrawing the entire line when
the changes cause no unrecoverable style updates, and are at the end of
the line (this applies to most normal typing situations).
Cases that this does not resolve:
- When the cursor is not at the end of the buffer
- When a display refresh changes the styles on the already-drawn parts
  of the line
- When the prompt has not yet been drawn, or has somehow changed

Fixes #5296.
2021-02-20 22:28:23 +01:00
Tom
101c6b01ed WindowServer: Improve small tooltips/windows shadows a bit
This fixes some artifacts with very small tooltip windows.
2021-02-20 22:28:11 +01:00
thankyouverycool
ef61a963e9 LibGUI: Always set tree column content width to widest open node
Fixes hidable horizontal scrollbars remaining visible even after
collapsing their responsible nodes. Tree column width defaults to
column header width if wider than current content.
2021-02-20 22:27:52 +01:00
thankyouverycool
2df219d608 LibGUI: Recheck size excesses when scrollbars become visible
Fixes edge cases in which hidden scrollbars could become visible
and obscure content or fail to hide when no longer needed
2021-02-20 22:27:52 +01:00
thankyouverycool
8789a91a4e LibGUI: Set IconView content width to actual content only
Fixes incorrect excess size reporting when updating scrollbars
and allows horizontal scrolling if IconView is resized smaller
than a single column
2021-02-20 22:27:52 +01:00
Andreas Kling
08476e7fe7 DynamicLoader: Always make .data segment read+write
Let's just ignore the program header and always go with read+write.
Nothing else makes sense anyway.
2021-02-20 19:02:48 +01:00
Andreas Kling
81c6d8e98e AK: Make Nonnull*PtrVector use size_t for indexes
This was weird. It turns out these class were using int indexes and
sizes despite being derived from Vector which uses size_t.

Make the universe right again by using size_t here as well.
2021-02-20 18:34:32 +01:00
Linus Groh
46efd2f741 Ports: Update vttest version in AvailablePorts.md 2021-02-20 18:31:00 +01:00
Andreas Kling
fa581a7470 Kernel: Mark some IDEController functions with UNMAP_AFTER_INIT 2021-02-20 17:28:29 +01:00
Andreas Kling
efd4f66f36 Kernel: Don't take debug logging lock in sprintf()
This function doesn't write to the log, and so doesn't need to acquire
the logging lock. (This is only used by GCC's name demangling thingy.)
2021-02-20 17:21:53 +01:00
Andreas Kling
4d9ce42532 AK: Remove unused kprintf macro
This hasn't been used for quite some time.
2021-02-20 17:21:03 +01:00
Andreas Kling
8d98051551 AK+LibC: Remove dbgprintf() :^)
Everything has been moved to dbgln() or other AK::Format-based APIs.
We can finally get rid of this old thing.
2021-02-20 17:17:30 +01:00
Andreas Kling
542d8591e0 LibVT: Oops, fix dbgln() invocation mistake 2021-02-20 17:16:33 +01:00
Andreas Kling
68406fc0ef LibCpp: Replace dbgprintf() with outln() 2021-02-20 17:12:25 +01:00
Andreas Kling
b1a705d7d8 LibTLS: Replace dbgprintf() with dbgln() 2021-02-20 17:06:39 +01:00
Andreas Kling
499a59ed86 LibVT: Put "unimplemented escape" whining on debug log
I'm not sure why we were injecting these debug messages into the
terminal output, but it makes a big mess for no benefit.
2021-02-20 17:04:46 +01:00
Andreas Kling
81b21504a7 LibVT: Implement switching between 80/132 column modes (DECCOLM)
This gets us past a few more screens in vttest. :^)
2021-02-20 17:04:46 +01:00
Andreas Kling
8c9ae4e537 Terminal+LibVT: Resize Terminal app window when requested by VT
This will allow us to react to things like DECCOLM.
2021-02-20 17:04:46 +01:00
Andreas Kling
bb6d6dce7b LibVT: Give proper names to remaining VTxxx control functions 2021-02-20 17:04:46 +01:00
Andreas Kling
61c5bd08af Ports: Update vttest to latest version 2021-02-20 17:04:46 +01:00
Andreas Kling
a59d96e461 LibVT: Give proper names to SD and SU 2021-02-20 17:04:46 +01:00
Andreas Kling
75084d3b3f LibVT: Move control function doc comments to Terminal.h header
Putting the little documentation comment about what each VTxxx control
function does in the header allows them to be picked up by IDE's.
2021-02-20 17:04:46 +01:00
Andreas Kling
6c7c6de52b LibVT: Give proper names to SCOSC and SCORC 2021-02-20 17:04:46 +01:00
Linus Groh
17959c1408 Base: Update path in js(1) manpage example 2021-02-20 16:05:20 +01:00
Linus Groh
1002236715 Base: Mention -n option in echo(1) manpage 2021-02-20 16:05:20 +01:00
Linus Groh
4896005fb2 Base: Tweak ddate(1) manpage tagline 2021-02-20 16:05:20 +01:00
Linus Groh
b80b6ffca0 Base: Unify synopsis format in manpages 2021-02-20 16:05:20 +01:00
Itamar
5bc82c0185 LanguageServers/Cpp: Add 'FindDeclaration' capability
The C++ LanguageServer can now find the matching declaration for
variable names, function calls, struct/class types and properties.

When clicking on one of the above with Ctrl pressed, HackStudio will
ask the language server to find a matching declaration, and navigate
to the result in the Editor. :^)
2021-02-20 15:53:37 +01:00
Itamar
d3ff82ba80 LibCpp: Store filename in ASTNodes
As part of the position information, we now also store the filename the
ASTNode belongs to.
2021-02-20 15:53:37 +01:00
Itamar
c4139be461 HackStudio: Always use relative paths when opening project files 2021-02-20 15:53:37 +01:00
Itamar
7ecb21afa7 AK: Add LexicalPath::relative_path 2021-02-20 15:53:37 +01:00
Itamar
50f887c9d5 HackStudio: Display identifiers as clickable
This extends the "navigate to include" feature to also display
identifiers as clickable when they're hovered over while left control
is pressed.
2021-02-20 15:53:37 +01:00
Andreas Kling
adb6db9774 FileManager: Set tooltips on the path breadcrumb bar
Each segment of the breadcrumb bar now shows the path it represents.
2021-02-20 14:23:41 +01:00