Skip to content

Commit

Permalink
#4 improve menu item label for multiline clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
skoro committed Dec 28, 2024
1 parent 01b12ce commit 6bc4258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function updateTrayContextMenu(tray, contextMenu, clipItems) {
* @return {string}
*/
function stringCut(str, limit, trail = '...') {
const cutStr = str.trim().split('\n')[0].trim();
const cutStr = str.trim().split('\n').map((s) => s.trim()).join(' ');

if (cutStr.length <= limit) {
return cutStr;
Expand Down

0 comments on commit 6bc4258

Please sign in to comment.