Browse Source

Ups the pageItemLimit

main
Eric Amodio 4 years ago
parent
commit
173d1368ce
4 changed files with 6 additions and 4 deletions
  1. +1
    -1
      package.json
  2. +3
    -1
      src/views/nodes/branchNode.ts
  3. +1
    -1
      src/views/nodes/fileHistoryNode.ts
  4. +1
    -1
      src/views/nodes/lineHistoryNode.ts

+ 1
- 1
package.json View File

@ -1838,7 +1838,7 @@
},
"gitlens.views.pageItemLimit": {
"type": "number",
"default": 20,
"default": 40,
"markdownDescription": "Specifies the number of items to show in a each page when paginating a view list. Use 0 to specify no limit",
"scope": "window"
},

+ 3
- 1
src/views/nodes/branchNode.ts View File

@ -346,7 +346,9 @@ export class BranchNode
private async getLog() {
if (this._log == null) {
// Ensure we always show all unpublished commits (and the upstream tip)
let limit = this.limit ?? this.view.config.defaultItemLimit;
let limit =
this.limit ??
(this.view instanceof CommitsView ? this.view.config.pageItemLimit : this.view.config.defaultItemLimit);
if (limit !== 0 && this.branch.state.ahead > limit) {
limit = this.branch.state.ahead + 1;
}

+ 1
- 1
src/views/nodes/fileHistoryNode.ts View File

@ -172,7 +172,7 @@ export class FileHistoryNode extends SubscribeableViewNode implements PageableVi
private async getLog() {
if (this._log == null) {
this._log = await Container.git.getLogForFile(this.uri.repoPath, this.uri.fsPath, {
limit: this.limit ?? this.view.config.defaultItemLimit,
limit: this.limit ?? this.view.config.pageItemLimit,
ref: this.uri.sha,
});
}

+ 1
- 1
src/views/nodes/lineHistoryNode.ts View File

@ -302,7 +302,7 @@ export class LineHistoryNode extends SubscribeableViewNode implements PageableVi
private async getLog(selection?: Selection) {
if (this._log == null) {
this._log = await Container.git.getLogForFile(this.uri.repoPath, this.uri.fsPath, {
limit: this.limit ?? this.view.config.defaultItemLimit,
limit: this.limit ?? this.view.config.pageItemLimit,
ref: this.uri.sha,
range: selection ?? this.selection,
renames: false,

Loading…
Cancel
Save