-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Allowing to define variable line heights #233110
Open
aiday-mar
wants to merge
45
commits into
main
Choose a base branch
from
line-height
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+427
−118
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
03425a9
Fix advanced line wrap if decorations are present
remcohaszing 88e5584
Support dynamic line heights using decorations
remcohaszing d84a703
undo commenting
aiday-mar a2637a1
fixing compiler errors
aiday-mar 824113e
placing tests in block comment
aiday-mar c54ab2c
adding logs
aiday-mar a98064b
limiting amount of logging
aiday-mar 8a71210
changikng the font size and the line height directly in the code
aiday-mar f4e5ada
wip
aiday-mar 8afcd7b
wip
aiday-mar 6c110ab
removing monaco editor related code
aiday-mar 5ee4853
wip
aiday-mar 38dfbf6
wip
aiday-mar d0685e2
wip
aiday-mar f7ba276
adding wip
aiday-mar f7d47a3
setting doc as internal
aiday-mar cf367af
pushing to text to the bottom
aiday-mar e329622
adding support for font size
aiday-mar 91d4be2
placing at the end
aiday-mar f7837fb
fixing tests
aiday-mar 25492d2
adding likne height setting
aiday-mar aaaad55
adding comments
aiday-mar 6395ef1
adding todo
aiday-mar 549e9ed
overriding the font size in sticky scroll
aiday-mar 95f7739
making sticky scroll also use the editor lines heights
aiday-mar ce134e3
updating sticky scroll on decoration change, investigating lines
aiday-mar 9dec371
Merge branch 'main' into line-height
aiday-mar 952f891
removing changes for font size, focusing on line height changes
aiday-mar 9f7b34c
adding code
aiday-mar c6d8a6d
adding css changes to position text at the bottom
aiday-mar 6ab9c03
adding also the chnages for demo
aiday-mar 20d1702
adding code
aiday-mar 54e8958
making content widgets correctly position themselves
aiday-mar e75e7f1
adding css changes to sticky scroll
aiday-mar c7ce4b2
adding more methods
aiday-mar 13e7c56
adding code
aiday-mar 5addef1
polishing
aiday-mar 4ee17c5
adding code
aiday-mar b4b62de
polishing
aiday-mar 4888a4d
adding css to sticky scroll
aiday-mar 61dbab1
fixing bug
aiday-mar aae1f6d
remove testing code
aiday-mar 35b214a
fixing tests
aiday-mar 295a526
removing extension surfacing
aiday-mar 1e596ca
Merge branch 'main' into line-height
alexdima 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ import { IWordAtPosition } from './core/wordHelper.js'; | |
import { FormattingOptions } from './languages.js'; | ||
import { ILanguageSelection } from './languages/language.js'; | ||
import { IBracketPairsTextModelPart } from './textModelBracketPairs.js'; | ||
import { IModelContentChange, IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelLanguageChangedEvent, IModelLanguageConfigurationChangedEvent, IModelOptionsChangedEvent, IModelTokensChangedEvent, InternalModelContentChangeEvent, ModelInjectedTextChangedEvent } from './textModelEvents.js'; | ||
import { IModelContentChange, IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelLanguageChangedEvent, IModelLanguageConfigurationChangedEvent, IModelOptionsChangedEvent, IModelTokensChangedEvent, InternalModelContentChangeEvent, ModelInjectedTextChangedEvent, ModelSpecialLineHeightChangedEvent } from './textModelEvents.js'; | ||
import { IGuidesTextModelPart } from './textModelGuides.js'; | ||
import { ITokenizationTextModelPart } from './tokenizationTextModelPart.js'; | ||
import { UndoRedoGroup } from '../../platform/undoRedo/common/undoRedo.js'; | ||
|
@@ -218,6 +218,10 @@ export interface IModelDecorationOptions { | |
* with the specified {@link IModelDecorationGlyphMarginOptions} in the glyph margin. | ||
*/ | ||
glyphMargin?: IModelDecorationGlyphMarginOptions | null; | ||
/** | ||
* If set, the decoration will override the line height of the lines it spans. This can only increase the line height, not decrease it. | ||
*/ | ||
lineHeight?: number | null; | ||
Comment on lines
+221
to
+224
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qq: why can the line height only be increased? |
||
/** | ||
* If set, the decoration will be rendered in the lines decorations with this CSS class name. | ||
*/ | ||
|
@@ -1233,6 +1237,12 @@ export interface ITextModel { | |
* @event | ||
*/ | ||
readonly onDidChangeDecorations: Event<IModelDecorationsChangedEvent>; | ||
/** | ||
* An event emitted when line heights from decorations changes | ||
* @internal | ||
* @event | ||
*/ | ||
readonly onDidChangeSpecialLineHeight: Event<ModelSpecialLineHeightChangedEvent>; | ||
/** | ||
* An event emitted when the model options have changed. | ||
* @event | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
Try to feed in a getter for this data via a new ctor field if necessary. Please don't add the line heights to the viewport data.