Skip to content

Commit cea6197

Browse files
committed
fix: add deprecation warning for LegacyAdapter
1 parent 6ff2dda commit cea6197

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/minimap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import DecorationManagement from './mixins/decoration-management'
55

66
import { Emitter, CompositeDisposable } from 'atom'
77
import StableAdapter from './adapters/stable-adapter'
8-
import LegacyAdapter from './adapters/legacy-adapter'
98

109
let nextModelId = 1
1110

@@ -209,6 +208,9 @@ export default class Minimap {
209208
if (atom.views.getView(this.textEditor).getScrollTop != null) {
210209
this.adapter = new StableAdapter(this.textEditor)
211210
} else {
211+
// TODO remove LegacyAdapter in the next major version
212+
atom.notifications.addWarning("LegacyAdapter of Minimap is deprecated and will be removed in the next major version. Please upgrade Atom to the latest version.")
213+
const LegacyAdapter = require('./adapters/legacy-adapter')
212214
this.adapter = new LegacyAdapter(this.textEditor)
213215
}
214216

0 commit comments

Comments
 (0)