Commit graph

8593 commits

Author SHA1 Message Date
AnotherTest
f9b0490383 LibLine: Handle ctrl-{left,right}_arrow by jumping between words
Words are delimited by spaces.
Perhaps this should be a configurable behaviour?
2020-04-20 20:23:26 +02:00
AnotherTest
54d400c685 LibVT: Handle ctrl+arrow keys
Prior to this commit, we would treat them the same.
2020-04-20 20:23:26 +02:00
Andreas Kling
50218f7edc Build: Use the GCC port if building on "SerenityOS" :^) 2020-04-20 19:52:35 +02:00
Linus Groh
cff68af965 LibJS: Add JSDoc to test-common.js 2020-04-20 17:31:49 +02:00
AnotherTest
e578b7884b LibLine: Properly handle ^C and do not return after being interrupted
this commit fixes a...surprisingly long-standing ^C bug, where it would
return the buffer instead of voiding it and starting over :^)
2020-04-20 17:27:30 +02:00
AnotherTest
42f06fc305 LibLine: Implement searching via up/down arrow keys 2020-04-20 17:27:30 +02:00
AnotherTest
58912994ab LibLine: Implement ^R searching
This commit adds searching in the editor history with ^R.
It does so by instantiating...another Line::Editor inside the current
Line::Editor :^)
2020-04-20 17:27:30 +02:00
Kesse Jones
df6696f576 LibJS: Add Array.prototype.reverse 2020-04-20 17:26:46 +02:00
Itamar
e35219b5ce Debugger: Add source-level operations
- Print current source location, if available
- Add a breakpoint at a source location
- "sl" command - step to the next line in source
2020-04-20 17:25:50 +02:00
Itamar
8a886e0e96 LibDebug: Parse line number information from DWARF format
DWARF line number information, if generated, is stored  in the
.debug_line section of an object file.

The information is encoded as instructions for a VM that is defined in
the DWARF specification.
By executing these instructions, we can extract the encoded line number
information.
2020-04-20 17:25:50 +02:00
Itamar
edaa9c06d9 LibELF: Make ELF::Loader RefCounted 2020-04-20 17:25:50 +02:00
Itamar
5c1b3ce42e AK: Allow having ref counted pointers to const object
We allow the ref-counting parts of an object to be mutated even when the
object itself is a const.

An important detail is that we allow invoking 'will_be_destroyed' and
'one_ref_left', which are not required to be const qualified, on const
objects.
2020-04-20 17:25:50 +02:00
Andreas Kling
badbe8bc99 Solitaire: Sharpen 16x16 icon 2020-04-20 15:24:59 +02:00
Andreas Kling
8311b24620 Solitaire: Use a pre-scaled buggie image for the back of cards
Instead of scaling on the fly, which is not super aesthetic yet.
2020-04-20 15:24:59 +02:00
angel
e0a16f8752 FileManager+LibGUI: Allow drop on entire DirectoryView
Previously, drag and drop would only work when dragging between node
items on a DirectoryView. This commit makes it possible to drag files to
the empty area of the DirectoryView and copy files more easily between
windows.
2020-04-20 12:15:26 +02:00
angel
27091d05ee DirectoryView: Don't push same path twice to history
When opening a path, check if it's the current one before pushing it
twice to the path history.
2020-04-20 12:15:26 +02:00
Kesse Jones
579975fd1e LibJS: Add Array.prototype.indexOf 2020-04-20 11:55:18 +02:00
Linus Groh
d3e3f5b421 LibJS: Add tests for String.prototype.repeat() 2020-04-20 11:41:25 +02:00
Linus Groh
a893c6ff0d LibJS: Throw RangeError in String.prototype.repeat() if count is invalid 2020-04-20 11:41:25 +02:00
Linus Groh
0718f216af LibJS: Add assertThrowsError() test function 2020-04-20 11:38:01 +02:00
Andreas Kling
c5730ed6a3 WindowServer: Fix AppletManager build 2020-04-19 20:24:03 +02:00
Andreas Kling
c45e16f605 LibCore: Add StandardPaths thing to retrieve various standard locations
Fixes #1853.
2020-04-19 19:57:05 +02:00
Andreas Kling
3b434068eb WindowServer: Don't crash when encountering unsorted menu applets
Fixes #1862.
2020-04-19 19:40:04 +02:00
Andreas Kling
98b990f20b Userland: Remove some little temporary test programs
These were never meant to stick around.
2020-04-19 19:40:04 +02:00
AnotherTest
0e5191de49 Shell: Correct suggestion of directories 2020-04-19 19:39:50 +02:00
AnotherTest
c97ca2fecc LibLine: Clear trailing trivia when cycling if the suggestion has any 2020-04-19 19:39:50 +02:00
Nicolas Van Bossuyt
b07bd1b95c
PaintBrush: Fix crash with flood fill. (#1881)
Fixed a crash occurring when initiating a flood fill out of the bitmap rectangle.
2020-04-19 19:29:07 +02:00
Linus Groh
f38897ef20 Base: Add Demo applications to system menu 2020-04-19 18:16:11 +02:00
Andreas Kling
7eeea4d57f Kernel: rmdir("/") should fail instead of asserting
We can't assume there's always a parent custody -- when we open "/"
there isn't gonna be one!

Fixes #1858.
2020-04-19 18:07:16 +02:00
Andreas Kling
4c19305a17 test_io: Unbreak symlink test after sys$readlink() '\0' changes 2020-04-19 18:07:09 +02:00
Andreas Kling
4393a2a96d LibGfx: Let the PNG decoder fail if the header is missing or too short 2020-04-19 17:48:43 +02:00
AnotherTest
992467cca3 LibJS: Do not assume that a call frame exists in {get,set}_variable 2020-04-19 17:36:37 +02:00
Andreas Kling
69566bd4d6 LibJS: Allow passing "js" flags to run-tests
This allows us to run "run-tests -g" for testing with GC after every
heap allocation. This may flush out bugs that would otherwise not
occur if GC'ing only occasionally.
2020-04-19 17:34:33 +02:00
Andreas Kling
f7a1696087 LibJS: Add MarkedValueList and use it for argument passing
A MarkedValueList is basically a Vector<JS::Value> that registers with
the Heap and makes sure that the stored values don't get GC'd.

Before this change, we were unsafely keeping Vector<JS::Value> in some
places, which is out-of-reach for the live reference finding logic
since Vector puts its elements on the heap by default.

We now pass all the JavaScript tests even when running with "js -g",
which does a GC on every heap allocation.
2020-04-19 17:34:33 +02:00
AnotherTest
cb3cf589ed LibLine: Allow suggestions to have trailing trivia strings
These strings would be applied when inserted into the buffer, but are
not shown as part of the suggestion.

This commit also patches up Userland/js and Shell to use this
functionality
2020-04-19 17:21:55 +02:00
AnotherTest
7ef48171ce LibLine: Complete only common prefixes, and tweak suggestion logic
On the first tab, only complete the token without suggesting extra
stuff, and on further tabs, show suggestions.
Except in one case where the completion is all in the buffer, then
we show the suggestions, but do no completion.
2020-04-19 17:21:55 +02:00
angel
238afd37cf FileManager: Replicate permissions on directory copy (#1437)
When copying files, the original file permissions are applied to the
copy. However, this was not done with directories. This should do it.
2020-04-19 17:18:27 +02:00
Linus Groh
2623bd711b Shell: Don't return early if command is in PATH and a directory 2020-04-19 17:17:17 +02:00
angel
11054fc9f9 FileManager: Fix recursive copy on drag
When a drag operation is accepted, we don't check whether the source
nodes contain the destination directory. This could trigger an unwanted
recursive copy.
2020-04-19 17:16:08 +02:00
Linus Groh
fc09767872 Shell: Explicitly check if command is a directory
This is a bit nicer than getting "Exec format error" after trying to
execvp() a directory.
2020-04-19 15:37:07 +02:00
angel
0ec37c0d64 FileManager: Ignore empty selections on tree view
If the selection is empty, the model index will be invalid and the file
system model will return the root directory path by default. This causes
the file manager to jump to the root directory when the currently
selected item on the tree view is deselected.
2020-04-19 15:23:16 +02:00
Linus Groh
440f017946 Base: Update js(1) manpage
- Include all options
- Update example REPL session to match current output
- Mention REPL's help()
- Add test mode section
2020-04-19 15:22:31 +02:00
Andreas Kling
afdba94f63 LibJS: Fix expectations in the function-TypeError.js test
They now match the new, more verbose error messages.
2020-04-19 14:51:47 +02:00
Andreas Kling
b251091a6a LibJS: CallExpression shouldn't throw TypeError or non-constructor call
This unbreaks the entire test suite. :^)
2020-04-19 14:51:47 +02:00
Vojtech Moravec
90f8a7a36b
Browser: Make removal of bookmark persistent (#1865)
Json model wasn't stored after bookmark removal.
Store the model if remove() was successful.
2020-04-19 14:43:16 +02:00
Andreas Kling
1b2d954d47 WindowServer: Remove debug spam in set_active_window() 2020-04-19 13:56:41 +02:00
Andreas Kling
453b678346 WindowServer: Don't automatically focus desktop window when added
Normally we focus any window that's added to the window stack. However,
for WindowType::Desktop this gets annoying since if the desktop manager
comes up after other GUI processes have already started, it steals the
focus from them.

Solve this by only auto-focusing desktop windows if they are the very
first window added.
2020-04-19 12:09:48 +02:00
Andreas Kling
2a9e29fbb8 LibJS: Add DeferGC, a RAII way to prevent GC temporarily 2020-04-19 12:09:32 +02:00
Sergey Bugaev
15daf88e93 Base: Document open(1) 2020-04-19 11:14:26 +02:00
Sergey Bugaev
b6eb7f42ac Userland: Add open(1)
This is a simple utility for invoking Core::DesktopServices::open() from command
line :^)
2020-04-19 11:14:26 +02:00