Skip to content

Instantly share code, notes, and snippets.

@k-takata
k-takata / enable-uncpath-on-cmd.exe.reg
Created May 9, 2015 07:26
Enable UNC path on cmd.exe
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001
@k-takata
k-takata / dirlist0.vim
Last active February 7, 2020 02:46
Benchmark of Vim's readdir()
func! Dirlist(d = '.')
new
let start = reltime()
setlocal buftype=nofile
let list = readdir(a:d)
call append(line('$'), list)
call append(line('$'), reltimestr(reltime(start)))
endfunc
@echo off
rem Update the DLL using MSVC.
rem If the old DLL is in use, rename it to avoid compilation error.
rem current support version of Visual C compiler is 2012 or later.
rem
rem usage: update-dll-msvc
rem
rem
rem Sample .vimrc:
rem
@k-takata
k-takata / mqpull.sh
Last active August 30, 2019 11:09
Do 'hg pull' and 'hg pull --mq' easily
#!/bin/sh
mainbundle=hg_main.bundle
mqbundle=hg_mq.bundle
rm -f $mainbundle $mqbundle
hg --pager=no incoming -v --bundle $mainbundle
hg --pager=no incoming --mq -v --bundle $mqbundle
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1703,55 +1703,12 @@ mch_print_set_fg(long_u fgcol)
# include <shlobj.h>
# endif
-typedef enum _FILE_INFO_BY_HANDLE_CLASS_ {
- FileBasicInfo_,
- FileStandardInfo_,
- FileNameInfo_,
From 35b9dc6481422ed93236d2c201ff7da122c8ae26 Mon Sep 17 00:00:00 2001
From: "K.Takata" <kentkt@csc.jp>
Date: Thu, 13 Jun 2019 23:15:37 +0900
Subject: [PATCH] sound: Fix some issues
* Update document about sound_playevent() on Windows.
* Some lines exceeded 80 columns.
* Types of some variables were wrong.
---
runtime/doc/eval.txt | 11 ++++++++---
From 40542b0f2055df62819ba25f8e1aee623a20fb5d Mon Sep 17 00:00:00 2001
From: "K.Takata" <kentkt@csc.jp>
Date: Tue, 11 Jun 2019 19:22:56 +0900
Subject: [PATCH] MSVC: Update makefile for sound
---
src/Make_mvc.mak | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
@k-takata
k-takata / README.md
Last active April 7, 2019 18:27
Output some data to Cygwin pty from a normal Win32 program
@k-takata
k-takata / buildvim.bat
Created March 13, 2019 04:16
Batch file for building (g)Vim using MSVC
@echo off
setlocal
:: Default I/F versions.
set LUA_VER=51
set PERL_VER=528
set PYTHON_VER=27
set PYTHON3_VER=37
set RUBY_VER=25
set RUBY_API_VER_LONG=2.5.0
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp
--- a/src/gui_dwrite.cpp
+++ b/src/gui_dwrite.cpp
@@ -1034,7 +1034,7 @@ DWriteContext::DrawText(const WCHAR *tex
TextRenderer renderer(this);
TextRendererContext context = { color, FLOAT(cellWidth), 0.0f };
- textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y) - 0.5f);
+ textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y));
}