瀏覽代碼

Makes status bar alignment configurable

main
Zack Schuster 7 年之前
committed by Eric Amodio
父節點
當前提交
263bdc728a
共有 3 個檔案被更改,包括 912 行新增898 行删除
  1. +906
    -897
      package.json
  2. +5
    -1
      src/blameActiveLineController.ts
  3. +1
    -0
      src/configuration.ts

+ 906
- 897
package.json
文件差異過大導致無法顯示
查看文件


+ 5
- 1
src/blameActiveLineController.ts 查看文件

@ -61,7 +61,11 @@ export class BlameActiveLineController extends Disposable {
if (!Objects.areEquivalent(cfg.statusBar, this._config && this._config.statusBar)) {
changed = true;
if (cfg.statusBar.enabled) {
this._statusBarItem = this._statusBarItem || window.createStatusBarItem(StatusBarAlignment.Right, 1000);
// Coerce invalid configuration to the default right alignment
const useDefaultAlignment = cfg.statusBar.alignment === 'right' || cfg.statusBar.alignment !== 'left';
const alignment = useDefaultAlignment ? StatusBarAlignment.Right : StatusBarAlignment.Left;
this._statusBarItem = this._statusBarItem || window.createStatusBarItem(alignment, 1000);
this._statusBarItem.command = cfg.statusBar.command;
}
else if (!cfg.statusBar.enabled && this._statusBarItem) {

+ 1
- 0
src/configuration.ts 查看文件

@ -91,6 +91,7 @@ export interface IStatusBarConfig {
command: StatusBarCommand;
date: 'off' | 'relative' | 'absolute';
dateFormat: string;
alignment: 'left' | 'right';
}
export interface IAdvancedConfig {

Loading…
取消
儲存