romgrk / termrk

Terminal for atom, using pty.js & term.js
MIT License
33 stars 7 forks source link

Getting error about duplicate key and major visual artifacts #93

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello

Since the update to 0.3.0 I'm getting the error Duplicate key '.termrk'. I've tried removing my Termrk settings entirely and reinstalling the package, but it seems to have no avail.

The strange thing is also, I can still open the terminal and ignore this error, but I get all kinds of weird visual artifacts (started happening since 0.3.0):

screenshot

When I open the console, it "slides out" as usual and takes the correct height, but when I activate it by clicking it, it suddenly pops over double of the height and moves everything up (as in the screenshot). Clicking an editor makes the height restore itself properly again.

In the console, I also do not see the cursor and I can only type characters, but backspace nor return work anymore (shift + backspace and shift + return work fine, however).

The backtrace:

Error: Duplicate key '.termrk'
  at Object.detectDuplicateKeys (/usr/lib/atom/node_modules/season/lib/cson.js:268:13)
  at /usr/lib/atom/node_modules/cson-parser/lib/parse.js:115:38
  at Array.reduce (native)
  at Obj (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:107:30)
  at transformNode (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:197:12)
  at Value (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:197:12)
  at Block (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:76:14)
  at transformNode (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:197:12)
  at Object.parse (/usr/lib/atom/node_modules/cson-parser/lib/parse.js:203:12)
  at parseObject (/usr/lib/atom/node_modules/season/lib/cson.js:42:23)
  at parseContentsSync (/usr/lib/atom/node_modules/season/lib/cson.js:68:16)
  at Object.readFileSync (/usr/lib/atom/node_modules/season/lib/cson.js:170:14)
  at /usr/lib/atom/src/package.js:387:38
  at Array.map (native)
  at Package.module.exports.Package.loadKeymaps (/usr/lib/atom/src/package.js:384:46)
  at /usr/lib/atom/src/package.js:110:19
  at Package.module.exports.Package.measure (/usr/lib/atom/src/package.js:92:15)
  at Package.module.exports.Package.load (/usr/lib/atom/src/package.js:106:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/usr/lib/atom/src/package-manager.js:458:14)
  at /usr/lib/atom/src/package-manager.js:402:19
  at Config.module.exports.Config.transact (/usr/lib/atom/src/config.js:312:16)
  at PackageManager.module.exports.PackageManager.loadPackages (/usr/lib/atom/src/package-manager.js:397:19)
  at /usr/lib/atom/src/atom-environment.js:772:28

Thanks in advance

EDIT: I solved the key issues by mapping these to native! in Atom's keymap. This was not necessary before but it seems this has changed with the keyboard layout updates in Atom 1.12. I see that you already have most of these keys in the package's keymap file, but these seem to be ignored (pasing them over to my own key file fixes it for some weird reason).

The white thingy in the screenshot appears to be an <input class="input-keylistener">.

romgrk commented 7 years ago

Duplicate key issue: this has been fixed. There was indeed a duplicate '.termrk' key in keymaps/terminal.cson, but it had been there for a while. Probably the season (CSON parser) package was updated during the 0.3.0 update, and is now more strict. (Strange though, I still see it at 5.3.0 in my installation)

For the visual artifacts, I can't reproduce. Can you confirm it still happens after 0.3.1?

ghost commented 7 years ago

Both issues seem to be resolved now. I'm not sure why the visual artifacts started appearing, but they are gone now. This also solved the issue with me having to map the other keys natively.

Thanks for your quick response!