-
-
Notifications
You must be signed in to change notification settings - Fork 95
New file menu item - Reopen Closed Tab #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
016fc53
feat: reopen closed tab
squarebat 862310d
add: documentation for reopen closed tab
squarebat 81c3bc8
modify: reopen-closed-tabs to use recently-closed-tabs preference
squarebat b180a90
modify: preference location, docs
squarebat 6d47e7b
modify: tab upper limit, docs, method args
squarebat cfad8a7
modify: pos args to kwargs
squarebat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3075,7 +3075,7 @@ | |
| ;; create-new-tab : -> void | ||
| ;; creates a new tab and updates the GUI for that new tab | ||
| (define/public create-new-tab | ||
| (lambda ([filename #f]) | ||
| (lambda ([filename #f] [start-pos 0] [end-pos 'same]) | ||
| (let* ([defs (new (drracket:get/extend:get-definitions-text))] | ||
| [tab-count (length tabs)] | ||
| [new-tab (new (drracket:get/extend:get-tab) | ||
|
|
@@ -3086,6 +3086,7 @@ | |
| (ints-shown? (not filename)))] | ||
| [ints (make-object (drracket:get/extend:get-interactions-text) new-tab)]) | ||
| (send new-tab set-ints ints) | ||
| (send (send new-tab get-defs) set-position start-pos end-pos) | ||
| (set! tabs (append tabs (list new-tab))) | ||
| (send tabs-panel append | ||
| (gui-utils:trim-string | ||
|
|
@@ -3266,8 +3267,8 @@ | |
| #t] | ||
| [else #f])) | ||
|
|
||
| (define/public (open-in-new-tab filename) | ||
| (create-new-tab filename)) | ||
| (define/public (open-in-new-tab filename [start-pos 0] [end-pos 0]) | ||
| (create-new-tab filename start-pos end-pos)) | ||
|
||
|
|
||
| ;; reopen-closed-tab : -> void | ||
| ;; Opens previously closed tabs. If no tabs were closed in current session, files from | ||
|
|
@@ -3421,7 +3422,7 @@ | |
| ;; truncate-list : (listof X) -> (listof X)[< new-len] | ||
| ;; takes a list and returns the | ||
| ;; front of the list, up to 'new-len' number of items | ||
| (define (truncate-list l new-len) | ||
| (define/private (truncate-list l new-len) | ||
| (define len (length l)) | ||
| (cond | ||
| [(<= len new-len) l] | ||
|
|
@@ -4110,7 +4111,7 @@ | |
| (mk-menu-item (λ (ed) (send ed get-spell-check-text)) | ||
| (λ (ed new-val) (send ed set-spell-check-text new-val)) | ||
| 'framework:spell-check-text? | ||
| #\t | ||
| #f | ||
| (string-constant spell-check-scribble-text)) | ||
|
|
||
| (new menu:can-restore-menu-item% | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keyword arguments here is better, eg: