Skip to content

Instantly share code, notes, and snippets.

�PNG

IHDRg�@�=�sBIT|d�tEXtSoftwaregnome-screenshot��>.tEXtCreation TimeSat 26 Sep 2020 10:20:38 AM CEST�� IDATx���wtT����Ϯz�HB$ ��E4c0�\�;�5��8���I��?;v\�%���q�ƽ!�L :*�^W���!XX�Ve��_����ܹ3�ܽ�A���H�% ��6PR�$I��\�$"���AR��2I�J;�HG�3^�͟3窿���[����xxx;�9�����Ɯ���w�]w/����ޓt@RM{�hor�_҄�i;�ӧ��B���L�v6p�qss����|||u����� ��%����4viOr�KҔҒ�/�jk<*+��/�Y���O����A $%��4�I�$�J۹2��7�d��P�g77w��W��x��4{��w����s�\Bb�8��Na�!̝{��{��w�̠�[RW���xxg��Ҳ#cƎ�%�@[u��9�ٹ��NA}%��S���6�]]]]Y� �)777WI��Եw挋�Tg�h���<��=u��9#���pp��3g���9���Nc� @7"9�M�Y�ڝ���a���f�Y�^����8kٽ���u�� -���rwwӲ�����)�R��?��՗�LW_���ug[^���w������|}|�u흿{@��G��k/����!���b��?~���Y���:M�:I ����o�֛�W��qm�Qg2鋯�Sʦ�u4G�>>7z�_u��|}m�v��:��ge���� /���H�^�����u��:t$CI������as�/O>�ԭ��������
@bfredl
bfredl / git2.nobj.c
Last active September 20, 2020 09:55
/***********************************************************************************************
************************************************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! Warning this file was generated from a set of *.nobj.lua definition files !!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
************************************************************************************************
***********************************************************************************************/
#include "luajit-2.0/lua.h"
#include "luajit-2.0/lauxlib.h"
diff --git a/pangoterm.c b/pangoterm.c
index 5985b51..7d93af6 100644
--- a/pangoterm.c
+++ b/pangoterm.c
@@ -2187,8 +2187,8 @@ void pangoterm_init_font(PangoTerm *pt) {
int height = pango_font_metrics_get_ascent(metrics) + pango_font_metrics_get_descent(metrics);
- pt->cell_width_pango = width;
pt->cell_width = PANGO_PIXELS_CEIL(width);
@bfredl
bfredl / tshl.lua
Last active February 29, 2020 13:59
cquery = [[
(ERROR) @ErrorMsg
"break" @keyword
"case" @keyword
"continue" @keyword
"do" @keyword
"else" @keyword
"for" @keyword
"if" @keyword
@bfredl
bfredl / tree_test.c
Last active August 7, 2016 12:43
kbtree itr test
#include "kbtree.h"
#include <stdlib.h>
#include <stdbool.h>
KBTREE_INIT(test, int, kb_generic_cmp)
#define N 5000
int main() {
kbtree_t(test) *b = kb_init(test, KB_DEFAULT_SIZE);
int nums[N];
kbitr_t itr;
@bfredl
bfredl / nvim-terminal-edit.py
Last active March 1, 2024 01:02 — forked from tarruda/nvim-terminal-edit.py
Edit file in host Neovim instance from a :terminal buffer
#!/usr/bin/env python
"""Edit a file in the host nvim instance."""
from __future__ import print_function
import os
import sys
from neovim import attach
args = sys.argv[1:]
if not args:
@bfredl
bfredl / polltest.py
Last active August 28, 2016 19:16
Poll test
import zmq
import neovim
import threading
from time import sleep
@neovim.plugin
class PollTest(object):
def __init__(self, vim):
self.vim = vim
self.ctx = zmq.Context.instance()
import xerox
class NvimClipboard(object):
def __init__(self, vim):
self.provides = ['clipboard']
def clipboard_get(self, reg):
txt = xerox.paste()
# emulate vim behavior
if txt.endswith('\n'):
from subprocess import Popen, PIPE
class NvimClipboard(object):
def __init__(self, vim):
self.provides = ['clipboard']
def sel_name(self, reg):
return 'clipboard' if reg == '+' else 'primary'
def clipboard_get(self, reg):
import sys
import neovim
from threading import Thread
from time import sleep
vim = neovim.connect(sys.argv[1])
buf = vim.current.buffer
def thread():
sleep(0.2)
for i in range(100):