Sublime Forum

Can't Paste in Windows 7 - Sublime Text 2 2181

#1

Hi,

I bought Sublime Text 2 a little while ago. Everything works great for a while.
Last few days, occasionally, the paste stops working.

I can copy, and get a confirmation on the number of characters copied at the bottom. I can paste them into Notepad, or Notepad++ (which ST2 is suppose to replace for me), but can’t paste them into the same page, or even a new page in ST2.

I can close the page and reopen, I can close the program and reopen, and none of those things work.

Restarting the whole PC seems to fix things.

I am using ST2 build 2181.
Windows 7 64-bit
Non-Local version

I am on a English keyboard (which was a bug I saw earlier posted elsewhere)
I verified the default settings and tried all paste key commands, including pasting and pasting with indent.

Hope this helps solve a bug. Thanks! Keep up the good work, by far my favorite application on my PC, first issues I have had.

0 Likes

Copy text (CMD+C) not working consistently
#2

When this happens, can you copy from another application and paste into Sublime Text 2?

Also, do you have any plugins installed?

0 Likes

#3

I have additional info. It seems to happen when the FN (Function) button is pressed on my laptop, or maybe in combination with something else. Is the FN button a secondary key-bind to anything? I am assuming this might be activating some sort of protection mode, or just makes it flat-out broken. Note - it only breaks it when Sublime Text 2 has focus and is the active window. Otherwise I can use function in other applications, which makes me think it’s application based and not a windows issue or form a external application.

Also, randomly, it starts working again. Some hidden keystroke re-enables it? Or maybe something timeouts out? Is there a error log that can be generated and parsed?

Nothing is running in the Sublime Text 2 console.

@jps - No Plugins Installed. I can not copy from another App. I verified that contents are being copied from ST2, because I can paste that into notepad or anything else. I tried to paste those contents back, or new contents, and they won’t paste.

0 Likes

#4

I am running into the same issue… Windows 7 Pro x64 on a Lenovo y460 (with the infamous IBM fn-ctrl key swap on the keyboard) and I haven’t been able to get copy or paste to work since I’ve been using the program.

Which is a bummer because I just purchased it and I can’t even paste in the license key :stuck_out_tongue:

Right click > copy & paste also do not work, nor does the edit menu options.

Edit - Ctrl-Z & Ctrl-Y work for undo/redo… so I don’t think its a problem with capturing the ctrl key click…

0 Likes

#5

Do we have any momentum on this?

I paid for the product and I absolutely love it. But this sort of hinders my ability to use it effectively.

0 Likes

#6

Sooo, after much sweet talking the computer it decided to start working all of a sudden and has since about 1pm today. :laughing:

Will update if anything happens further

0 Likes

#7

Khrome83: Do the menu items work for you, or pressing the alternative paste shortcut, shift+insert?

Apart from the two reports in this thread, I’ve never heard of this issue before.

0 Likes

#8

it appears that if i open sublime text as the first thing after my computer boots it works BUT if i open another app (chrome, photoshop, etc) then sublime text paste does not work. shift+insert does not work either.

0 Likes

#9

Menu items don’t let me paste.
Alternate key bindings don’t.

I can confirm that it seems to be a issue with switching between applications.

Restarting fixes it, as well as after several hours the problem will go away. I have the same apps n388mm listed and use as well. As well as the same x64 Win 7 OS.

I was not able to confirm that FN key is causing it, although it happens sometimes. It’s really unpredictable.

0 Likes

#10

Dev build 2190 (sublimetext.com/dev) adds a couple of debugging messages on Windows if it’s unable to access the text content on the clipboard. I’d appreciate it if you could:

  • Install 2190
  • Open the Console (View/Show Console)
  • Paste some text, and assuming it doesn’t insert anything, see if any messages have appeared in the console
0 Likes

#11

Hello

I just ran into this problem, so have updated to 2190. Having experienced the problem just now I’m getting the following in the console:

Unable to extract text from clipboard

I also noted that the CTRL+` shortcut didn’t work, I had to use the View menu.

(Thanks for an awesome editor btw)

[edit]I have no plugins installed, and have added an SCSS syntax highlighter[/edit]

0 Likes

#12

A couple of extra bits of information would be helpful:

  • Which version of Windows are you using?
  • Do you have a clipboard manager installed?
  • Which application was the text copied from? I’m assuming it has been copied directly from Sublime Text.

The message “Unable to extract text from the clipboard” indicates that the call to the win32 API function GetClipboardData(CF_UNICODETEXT) is failing. This generally occurs when there is no text on the clipboard.

It would be helpful if you could use an application such as CLCL (freeware, nakka.com/soft/clcl/index_eng.html), and list the reported clipboard formats (the expectation is that there should be at least UNICODE TEXT, TEXT, and OEM TEXT reported)

0 Likes

#13

Hello, apologies for missing some information.

Win7 64bit (Pro)
No clipboard manager (at the time, CLCL now!)
The text was copied from several places: Sublime, Opera, Opera Dragonfly, Firefox, Notepad++, etc…

The problem is intermittent unfortunately, and I’m not experiencing it at present. I’ve installed CLCL anyway, and using the Viewer the clipboard has:

UNICODE TEXT
sublime-text-extra
LOCALE
TEXT
OEM TEXT

Under history, each of the remembered elements has only type TEXT, but this appears to be normal as copy/pasting is working fine.

If I experience the problem again I’ll compare the Viewer again and see if anything is different

Thanks

Barry

0 Likes

#14

Hello

OK, just run into the problem again. From memory the only steps I’ve taken since starting the program are:

  1. Open program (last used project opens)
  2. Close project
  3. Add a folder to project
  4. Save project as…
  5. Open a .js file
  6. Open a .php file
  7. Copy text from Opera: “locale=en-UK”
  8. Cannot paste into Sublime Text (Can paste into other programs)

Getting the same error in the console (still cannot open it with shortcut). CLCL shows copied text in clipboard (TEXT, UNICODE TEXT, LOCALE, OEM TEXT).

Closed and reopened, problem went away.

0 Likes

#15

So I installed build 2190 as requested. I opened the console. Opened the files I needed, copied a block of code and tried to paste. It failed. Both with keyboard and context menu links.

Console Contents -

startup, version: 2190 windows x64 channel: dev
executable: /C/Program Files/Sublime Text 2/sublime_text.exe
working dir: /C/Program Files (x86)/FileZilla FTP Client
packages path: /C/Users/Khrome/AppData/Roaming/Sublime Text 2/Packages
settings path: /C/Users/Khrome/AppData/Roaming/Sublime Text 2/Settings
error parsing session: No data at: 0:0
package /C/Program Files/Sublime Text 2/Pristine Packages/ActionScript.sublime-package is newer than the installed version (/C/Users/Khrome/AppData/Roaming/Sublime Text 2/Pristine Packages/ActionScript.sublime-package), running PackageSetup
Py_GetProgramName(): sublime_text.exe
Py_GetExecPrefix(): C:\Program Files\Sublime Text 2
Py_GetProgramFullPath(): C:\Program Files\Sublime Text 2\sublime_text.exe
Py_GetPath(): C:\Program Files\Sublime Text 2\python26.zip;C:\Program Files\Sublime Text 2\DLLs;C:\Program Files\Sublime Text 2\lib;C:\Program Files\Sublime Text 2\lib\plat-win;C:\Program Files\Sublime Text 2\lib\lib-tk;C:\Program Files\Sublime Text 2
Py_GetPythonHome(): C:\Program Files\Sublime Text 2
PackageSetup returned: -1
catalogue loaded
found 4 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
found 1 files for base name Main.sublime-menu
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\comment.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\copy_path.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\delete_word.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\detect_indentation.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\duplicate_line.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\echo.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\exec.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\fold.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\font.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\goto_line.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\indentation.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\kill_ring.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\mark.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\new_templates.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\open_file_settings.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\paragraph.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\save_on_focus_lost.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\scroll.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\set_unsaved_view_name.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\side_bar.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\sort.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\swap_line.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\switch_file.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\transform.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\transpose.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Default\trim_trailing_white_space.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\Diff\diff.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\HTML\encode_html_entities.py
Reloading plugin C:\Users\Khrome\AppData\Roaming\Sublime Text 2\Packages\HTML\html_completions.py
plugin init time: 0.306014
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
pre session restore time: 7.15614
wrote startup cache, added files: 8 orphaned files: 0 total files: 89 cache hits: 81
startup time: 7.32697 (package setup was run)
loaded 934 snippets
Unable to extract text from clipboard

I was able to then paste the contents into another application without problem. I do not use a clipboard application outside of what comes pre-installed on windows.

0 Likes

#16

I was not able to get CLCL working for me on Windows 7 64-bit. Is there a alternative application (more recently updated since 2005) that I could use to help you debug this?

0 Likes

#17

One small bug I noticed, was that I could not close the console while text inside was highlighted. This might be intentional, but there is no notice. It was confusing at first. I didn’t make a new topic for this because of how minor this is, and that I would not of seen it if not for trying to help you debug this.

0 Likes

#18

There have been a couple of additional changes in nightly build 2191, there will be more details in the console if pasting doesn’t work, or a workaround may fix the issue. 2191 is available to registered users only, but the changes will be rolled into a future dev build.

0 Likes

#19

Let me know when its available for download so I can test it. What do you mean by “Registered Users”?

0 Likes

#20

Registered = people who have purchased a license get access to the Nightly builds.

0 Likes